Imports System
Imports Microsoft.VisualBasic
Public Class SamplesArray
Public Shared Sub Main()
Dim my3DArray As Array = Array.CreateInstance(GetType(Object), 2, 3, 4)
Dim i As Integer
For i = my3DArray.GetLowerBound(0) To my3DArray.GetUpperBound(0)
Dim j As Integer
For j = my3DArray.GetLowerBound(1) To my3DArray.GetUpperBound(1)
Dim k As Integer
For k = my3DArray.GetLowerBound(2) To my3DArray.GetUpperBound(2)
my3DArray.SetValue("abc" + i.ToString() + j.ToString() + k.ToString(), i, j, k)
Next k
Next j
Next i
PrintValues(my3DArray)
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