在VB中,可以使用以下方法给数组赋值:
Array
函数:Dim arr(2) As Integer
arr = Array(1, 2, 3)
Dim arr(2) As Integer
arr(0) = 1
arr(1) = 2
arr(2) = 3
Dim arr(2) As Integer
For i = 0 To 2
arr(i) = i + 1
Next i
Split
函数将字符串分割为数组:Dim arr() As String
arr = Split("apple,orange,banana", ",")