語言

FreezableCollection<T>.Item[Int32] 屬性

定義

取得或設定位於指定索引處的專案。

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

參數

index
Int32

要取得或設定的元素的零基指數。

屬性值

T

位於指定索引的元素。

實作

例外狀況

index 小於0。

-或-

index 等於或大於 Count。

指定的元素為 null。

當集合凍結時嘗試將項目置入集合(其 IsFrozen 屬性為 true)。

適用於