Imports System
Public Class MainClass
Shared Sub Main(ByVal args As String())
Dim squares As Array = _
Array.CreateInstance(GetType(Integer), 11)
For i As Integer = 0 To 10
squares.SetValue(i * i, i)
Next i
Dim txt As String = ""
For i As Integer = 0 To 10
Console.WriteLine( squares.GetValue(i).ToString )
Next i
End Sub
End Class
|