比如C#中:
string[] TbName,TbCompany,TbWord; //类开始定义
...
//下面内容在类的方法中
TbName = new string[count]; //count是动态变量,
TbCompany = new string[count];
TbWord = new string[count];
这个例子要怎么转换成vb.net的呢?
谢谢!
6 个解决方案
#1
dim tbname() as string
redim rbname(count) //count是动态变量,
redim rbname(count) //count是动态变量,
#2
dim tbname() as string
redim tbname(count) //count是动态变量
redim tbname(count) //count是动态变量
#3
请问如何实例化数组中的全部元素?
#4
private tbname() as string
private CONST MAXBUF as integer
sub new()
Redim tbname(MAXBUF-1)
end sub
实例化数组之后通过动态变量count调用即可。
tbname(count)
private CONST MAXBUF as integer
sub new()
Redim tbname(MAXBUF-1)
end sub
实例化数组之后通过动态变量count调用即可。
tbname(count)
#5
用动态数组吧!
#6
dim aa() as string
---动态数组
redim aa(20)
--保留数据动态数组
redim preserve aa(30)
---动态数组
redim aa(20)
--保留数据动态数组
redim preserve aa(30)
#1
dim tbname() as string
redim rbname(count) //count是动态变量,
redim rbname(count) //count是动态变量,
#2
dim tbname() as string
redim tbname(count) //count是动态变量
redim tbname(count) //count是动态变量
#3
请问如何实例化数组中的全部元素?
#4
private tbname() as string
private CONST MAXBUF as integer
sub new()
Redim tbname(MAXBUF-1)
end sub
实例化数组之后通过动态变量count调用即可。
tbname(count)
private CONST MAXBUF as integer
sub new()
Redim tbname(MAXBUF-1)
end sub
实例化数组之后通过动态变量count调用即可。
tbname(count)
#5
用动态数组吧!
#6
dim aa() as string
---动态数组
redim aa(20)
--保留数据动态数组
redim preserve aa(30)
---动态数组
redim aa(20)
--保留数据动态数组
redim preserve aa(30)