How to determine the longest dimension of an multi-dimension array in C#
I was wandering if I have a multi-dimension array (M*N matrix), how to determ开发者_StackOverflow社区ine the value of M and N in C#?
Thanks.
Use the Array.GetLength() method. You can pass in 0 or 1 for your 2D array.
精彩评论