vb.net数组直接赋值 vbs定义数组的方法
vb.net数组赋值
Dim x(8, 8)
10年积累的成都做网站、成都网站设计经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站策划后付款的网站建设流程,更有让胡路免费网站建设让你可以放心的选择与我们合作。
Dim a As Integer
Dim b As Integer
b = 0
For i = 0 To 8
For j = 0 To 8
If b = 3 Then
b = 1
a = a + 1
Else
b = b + 1
End If
x(i, j) = aNext
Next
vb.net 数组 赋值
Module Module1
Sub Main()
Dim i, k As Integer
Dim a(,) As Integer = {{1, 2}, {2, 4}, {3, 4}}
For i = 0 To 2
For k = 0 To 1
Console.Write("a({0},{1})={2} ", i, k, a(i, k))
Next
Console.WriteLine()
Next
Console.Read()
End Sub
End Module
vb.net数组如何赋值
Dim abc(2) As Integer
abc = {0, 1, 2}
'或者
Dim abcd() As Integer
ReDim abcd(9)
For i As Integer = 0 To abcd.Length - 1
abcd(i) = i
Next
也可声明为字符串数组
分享文章:vb.net数组直接赋值 vbs定义数组的方法
转载注明:http://pwwzsj.com/article/highoi.html