Link to home
Start Free TrialLog in
Avatar of yaronusa
yaronusa

asked on

How to count number of dimensions in double array in c# csharp c sharp ??

How do I count number of dimensions in double array?

I have an array:

int[,] x= new int[10,5]; //Pretend my program is not aware of these dimensions.

I know I can find out the length of the "second dimension", like this:

x.getLength(0) //returns 5

But how can I find out how big the "first" dimension is?


ASKER CERTIFIED SOLUTION
Avatar of abel
abel
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yaronusa
yaronusa

ASKER

Now I know! thanks!
So, in code this looks something like:

int[,] x = new int[10, 5];
return x.Rank;

Open in new window

You're welcome :)