c# length 2d array

C#
int rowsOrHeight = ary.GetLength(0);
int colsOrWidth = ary.GetLength(1);
Source

Also in C#: