开发者

How to determine the longest dimension of an multi-dimension array in C#

开发者 https://www.devze.com 2023-01-06 13:58 出处:网络
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#?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号