語言

ItemCollection.Item[Int32] 屬性

定義

取得或將項目設為給定的零基索引。

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

參數

index
Int32

項目的零基指數。

屬性值

取回的物件或被設定為指定索引的物件。

實作

例外狀況

該集合尚未初始化,或要設定的項目已有不同的邏輯父,或是集合處於模式 ItemsSource 狀態。

指數超出範圍。

適用於