Module Tester
Sub Main()
Dim i As Integer
Dim array As Integer() ' declare array variable
array = New Integer(9) {} ' allocate memory for array
Console.WriteLine("Subscript " & vbTab & "Value")
For i = 0 To array.GetUpperBound(0)
Console.WriteLine( i & vbTab & array(i))
Next
Console.WriteLine("The array contains " & _
array.Length & " elements.")
End Sub
End Module
|