Array.GetLongLength(Int32) 方法

定义

获取一个 64 位整数,该整数表示 Array 的指定维中的元素数。Gets a 64-bit integer that represents the number of elements in the specified dimension of the Array.

public:
 long GetLongLength(int dimension);
public long GetLongLength (int dimension);
[System.Runtime.InteropServices.ComVisible(false)]
public long GetLongLength (int dimension);
member this.GetLongLength : int -> int64
Public Function GetLongLength (dimension As Integer) As Long

参数

dimension
Int32

Array 的从零开始的维度,其长度需要确定。A zero-based dimension of the Array whose length needs to be determined.

返回

一个 64 位整数,它表示指定维中的元素数。A 64-bit integer that represents the number of elements in the specified dimension.

属性

例外

dimension 小于零。dimension is less than zero.

-或--or- dimension 等于或大于 Rankdimension is equal to or greater than Rank.

注解

GetLongLength(0)GetLongLength 的示例,该示例返回 Array第一维中的元素数目。An example of GetLongLength is GetLongLength(0), which returns the number of elements in the first dimension of the Array.

此方法为 O (1)操作。This method is an O(1) operation.

适用于

另请参阅