[.net] multidimensional arrays

Started by
1 comment, last by Daniel Miller 18 years, 10 months ago
In C#, how do you get the width and height of an array like this?: int[,] array; Do I have to use an array of arrays?
Advertisement
int[ , ] array = new int[ 5, 9 ];
int a = array.GetLength( 0 ); // a = 5
int b = array.GetLength( 1 ); // b = 9
You should never let your fears become the boundaries of your dreams.
Thanks! [smile]

I was looking at the properties instead of methods.

This topic is closed to new replies.

Advertisement