4D масив
static void Show(string[,,,] arr)
{
for (int i = 0; i < arr.GetLength(0); i++)
{
for (int j = 0; j < arr.GetLength(1); j++)
{
for (int k = 0; k < arr.GetLength(2); k++)
{
for (int l = 0; l < arr.GetLength(3); l++)
{
Console.Write(arr[i, j, k, l] + " ");
}
}
}
}
}
main
string[,,,] week = new string[2, 2, 2, 2]{
{
{
{ "1", "1" }, { "2", "2" }
},
{
{ "3", "3" }, { "4", "4" }
}
},
{
{
{ "5", "5" }, { "6", "6" }
},
{
{ "7", "7" }, { "8", "8" }
}
} };
Show(week);
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8