NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Array.GetLength

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

[Visual Basic]
Public Function GetLength( _
   ByVal dimension As Integer _
) As Integer
[C#]
public int GetLength(
   int dimension
);
[C++]
public: int GetLength(
   int dimension
);
[JScript]
public function GetLength(
   dimension : int
) : int;

Parameters

dimension
A zero-based dimension of the Array whose length to determine.

Return Value

The number of elements in the specified dimension.

Exceptions

Exception Type Condition
IndexOutOfRangeException dimension is less than zero.

-or-

dimension is equal to or greater than Rank.

Remarks

For example, GetLength (0) returns the number of elements in the first dimension of the Array.

See Also

Array Class | Array Members | System Namespace | Length | Rank