C# Array GetLongLength
Description
Array GetLongLength
gets a 64-bit integer that represents
the number of elements in the specified dimension of the Array.
Syntax
Array.GetLongLength
has the following syntax.
[ComVisibleAttribute(false)]
public long GetLongLength(
int dimension
)
Parameters
Array.GetLongLength
has the following parameters.
dimension
- A zero-based dimension of the Array whose length needs to be determined.
Returns
Array.GetLongLength
method returns A 64-bit integer that represents the number of elements in the specified
dimension.
Example
using System;/*from www. j ava2s. c om*/
public class SamplesArray
{
public static void Main()
{
Array MyArray1 = Array.CreateInstance(typeof(int), 5);
Console.WriteLine( MyArray1.GetLongLength(1));
}
}
The code above generates the following result.