Array.GetLongLength(Int32) Array.GetLongLength(Int32) Array.GetLongLength(Int32) Array.GetLongLength(Int32) Method

定义

获取一个 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);
[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 Int32 Int32 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一个示例是GetLongLength(0), 它返回的第一个维度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.

适用于

另请参阅