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

項目之以零起始的索引。

屬性值

Object

擷取的物件,或正被設為指定索引的物件。

實作

例外狀況

集合未初始化,或要設定的項目已具有不同的邏輯父項目,或集合在 ItemsSource 模式中。

索引超出範圍。

適用於