How do I get the inner arrays length in a 2d array in C#?
- by Phukab
Lets say I create a jagged 2d array like so:
public static char[,] phoneLetterMapping = { {'0'}, {'1'}, {'A', 'B', 'C'} };
Now, given the first index of the array, I would like to be able to get the length of the inner array.
So, I would like to be able to do something like:
phoneLetterMapping[2].length
I can do that in Java. But the intellisense menu doesn't return the normal members of an array when I type in the first bracket of the [][] 2d array.
So, how do I get the inner array lengths in my 2d array in C#?