Option Strict On
Public Class DynamicArray
Public Shared Sub Main()
Dim index As Integer = 10
Dim arr(index) As Integer
arr(index) = CInt(index ^ 2)
index = 20
ReDim Preserve arr(index)
arr(index) = CInt(index ^ 2)
index = 10
ReDim Preserve arr(index)
Console.WriteLine(arr(index))
End Sub
End Class
100