如何在VB.net中找到2D数组中的行数?

Yug*_*dle 5 .net vb.net

如何找到2D数组中的水平行数?

我有 :

   Dim i(,) As Integer = {{2, 5, 6, 7}, {32, 5, 4, 2}}
Run Code Online (Sandbox Code Playgroud)

找到i中的行数?

例如 :

 // Here, array i has 2 sets of data i.e. 2 rows
 // set1 = {2,5,6,7} and set2 = {32,5,4,2}
 // So, I want the number of sets i.e 2 in this case !
Run Code Online (Sandbox Code Playgroud)

请帮忙 !

Mat*_*nen 13

该对GetLength方法可用于找出该阵列的任何尺寸的长度.

  • 我明白了.. i.GetLength(0)给出了所需的结果.谢谢 ! (2认同)