Get Array length in integer in CSharp
Description
The following code shows how to get Array length in integer.
Example
using System;/* ww w . j av a 2s. com*/
public class SamplesArray
{
public static void Main()
{
Array MyArray1 = Array.CreateInstance(typeof(int), 5);
Console.WriteLine( MyArray1.GetLength(0));
}
}
The code above generates the following result.