我正在尝试增加二维数组的 x 值,但我一直收到此错误。
'ReDim' can only change the rightmost dimension
我需要在维护数组数据的同时执行此操作。这是我的代码。
Dim x As Integer = 0
Dim y As Integer = 0
While reader.Read()
ReDim Preserve catagoryInfo(x, 2)
catagoryInfo(x, y) = reader.GetString(0)
y += 1
catagoryInfo(x, y) = reader.GetString(1)
x += 1
y = 0
End While