Vector<T>.Item[Int32] 屬性

定義

取得位於指定索引上的項目。

public:
 property T default[int] { T get(int index); };
public T this[int index] { get; }
member this.Item(int) : 'T
member this.Item(int) : 'T
Default Public ReadOnly Property Item(index As Integer) As T

參數

index
Int32

要傳回的項目索引。

屬性值

T

位於索引 index 的項目。

例外狀況

index 小於零。

-或-

index 大於或等於 Count

.NET 5 和更新版本:不支持類型 T

index 小於零或大於項目的數目。

適用於