Mono Class Library: System.Array Overview | Members

System.Array.GetLength Method

Gets the number of elements in the specified dimension of the array.

public int GetLength (int dimension)

Parameters

dimension
The zero-based dimension of the array whose length is to be determined.

Returns

The number of elements in the specified dimension of the array.

Exceptions

TypeReason
IndexOutOfRangeException

dimension is less than zero.

-or-

dimension is equal to or greater than Array.Rank.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0