語言

ComboBox.ObjectCollection.Item[Int32] 屬性

定義

在集合中指定的索引處取得該項目。

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

參數

index
Int32

集合中要檢索項目的索引。

屬性值

一個物件,代表位於集合中指定索引的項目。

實作

屬性

例外狀況

指數低於零。

-或-

index這個數字大於收藏品數量。

備註

你可以用這個方法在收藏中指定的位置取得該物品。 你可以用它 IndexOf 來查找物品的位置,或者使用該 Add 方法的索引回報。

適用於

另請參閱