int[,,] moreInts = { {{10,20,30}, {60,70,80}, {111,222,333}} };
How do I retrieve the size of each dimension in this multi-dimensional array when it is defined and initialized in the same statement? I know by looking that it is [1,3,3], but how do I determine that programmatically?
The GetLength method can be used to return the size of a array’s dimension
This is the correct way for an array declared [,,]. For arrays declared [][][], where each could have a different number of dimensions, KeithS’s method is correct.