CorArray: GetLength |
Gets a 32-bit integer that represents the number of elements in the specified dimension of the array.
Public Function GetLength( ByRef Arr As Variant, ByVal Dimension As Long ) As Long
An example of GetLength is GetLength(Arr, 1), which returns the number of elements in the first dimension of the array.
Exception | Condition |
---|---|
ArgumentException | Arr is not an array. |
ArgumentNullException | Arr is an uninitialized array. |
IndexOutOfRangeException |
Dimension is less than one. -or- Dimension is greater than rank. |