Gets the upper bound of the specified dimension in the Array.
[Visual Basic] Public Function GetUpperBound( _ ByVal dimension As Integer _ ) As Integer [C#] public int GetUpperBound( int dimension ); [C++] public: int GetUpperBound( int dimension ); [JScript] public function GetUpperBound( dimension : int ) : int;
The upper bound of the specified dimension in the Array.
Exception Type | Condition |
---|---|
IndexOutOfRangeException | dimension is less than zero.
-or- dimension is equal to or greater than Rank. |
For example, GetUpperBound (0) returns the upper bound for the indices of the first dimension of the Array and GetUpperBound (Rank- 1) returns the upper bound of the last dimension of the Array.
Array Class | Array Members | System Namespace | GetLowerBound | Rank