Two dimension array Demo
Imports System
Imports System.Diagnostics
Public Class MainClass
Shared Sub Main()
Dim int_values(,) As Integer = _
{ _
{1, 2, 3}, _
{4, 5, 6} _
}
For i As Integer = 0 To 1
For j As Integer = 0 To 2
Console.Write(int_values(i, j))
Next j
Console.WriteLine("")
Next i
Dim str_values(,,) As String = _
{ _
{ _
{"000", "001", "002"}, _
{"010", "011", "012"} _
}, _
{ _
{"100", "101", "102"}, _
{"110", "111", "112"} _
} _
}
Console.WriteLine("")
For i As Integer = 0 To 1
For j As Integer = 0 To 1
For k As Integer = 0 To 2
Console.Write(str_values(i, j, k) & " ")
Next k
Next j
Console.WriteLine("")
Next i
End Sub
End Class
Related examples in the same category