Array Size (Length) in C#

If it’s a one-dimensional array a, will give the number of elements of a. If b is a rectangular multi-dimensional array (for example, int[,] b = new int[3, 5];) will give the number of dimensions (2) and will get the length of any given dimension (0-based indexing for the dimensions – so b.GetLength(0) is 3 and b.GetLength(1) is 5). See System.Array documentation for more info. As … Read more