for two dimensional array, when we look at the initializer list, we can clearly know that what kind of 2 dimensional array it is. According to how the 2D array is outlined, we say it is 4 x 3 2D array. And then to access the value of 1, we would say use indices of 0, 0 and acess value 6, we use 1, 2.Code:int [,] 2D = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}};
But when it comes to 3D array, I am so confused.
Take this one for example, which I stole it from MSDN.
How can we tell what kind of 3D array it is? Is it 1 x 2 x 3 or what? And besides, what are the three indices to use to access the second or third value within the first set or second set of the curly braces? I am stuck and I hope there would be some help.Code:int[, ,] array3D = new int[,,] { { { 1, 2, 3 } }, { { 4, 5, 6 } }}