python - What is the name of Python's "vars()" function in vb.net?
问题描述
I have this simple piece of code:
##Variables representing a table of 5 rows and 5 columns:
r1c1, r1c2, r1c3, r1c4, r1c5 = "","","","",""
r2c1, r2c2, r2c3... = "","","","",""
#for all 5 rows. (I know this is not the best way to do things, but bare with me)
for r in range(1,6):
for c in range(1,6):
currentPos= "r"+str(r)+"c"+str(c)
vars()[currentPos]="identified"
#print(currentPos)
print(r1c1)
print(r1c2)
print(r...)
All of these variables actually represent a number of objects in my vb.net program, whose .text property I want to alter to a value.
In essence, I don't know what the vb version of the python "var()" function is, if there is any at all.
Further detail: I actually want all the fields and rows from a database to correspond to each positioned textbox in my vb program.
Alternative solutions are also okay.
解决方案
推荐阅读
- css - 透明 CSS 十六进制值
- javascript - 测试是否调用了函数
- javascript - React MUI:匹配两个网格部分的高度
- c# - 如何使用 asp.net core 向网页动态添加不同的控件?
- python - 为什么 f-string 在 Python 3 中不是默认值?
- blockchain - 对以太坊区块链的不同区块的多个读取函数调用批处理在一起
- android - Jetpack 为 Button 和 IconButton 编写 onClickLabel
- python-3.x - 如何使用 setup.cfg 将数据放入 Python 包中
- coq - Coq 中的实数
- c# - 使用 C# 保存 Tableau API 响应中包含的 Excel 文件