Imports System
Imports Microsoft.VisualBasic
Public Class SamplesArray
Public Shared Sub Main()
Dim my1DArray As Array = Array.CreateInstance(GetType(Int32), 5)
Dim i As Integer
For i = my1DArray.GetLowerBound(0) To my1DArray.GetUpperBound(0)
my1DArray.SetValue(i + 1, i)
Next i
PrintValues(my1DArray)
End Sub
Public Shared Sub PrintValues(myArr As Array)
Dim myEnumerator As System.Collections.IEnumerator = myArr.GetEnumerator()
While myEnumerator.MoveNext()
Console.WriteLine(myEnumerator.Current)
End While
End Sub
End Class