Array.GetLongLength(Int32) 方法

定義

取得代表 Array 指定維度之元素數目的 64 位元整數。

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
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.GetLongLength : int -> int64
Public Function GetLongLength (dimension As Integer) As Long

參數

dimension
Int32

需要決定長度之 Array 的以零為起始的維度。

傳回

64 位元的整數,代表指定維度的元素數目。

屬性

例外狀況

dimension 小於零。

-或-

dimension 等於或大於 Rank

備註

GetLongLength 範例是 GetLongLength(0) ,它會傳回 的第一個維度 Array 中的專案數目。

這個方法是 O (1) 作業。

適用於

另請參閱