VB中给数组赋值的方法有以下几种:
Dim arr() As Integer = {1, 2, 3, 4, 5}
Dim arr(4) As Integer
For i As Integer = 0 To 4
arr(i) = i + 1
Next
Dim str As String = "1,2,3,4,5"
Dim arr() As String = str.Split(",")
Dim arr As Array = Array.CreateInstance(GetType(Integer), 5)
For i As Integer = 0 To 4
arr(i) = i + 1
Next