ListBox.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)>]
member this.Item(int) : obj with get, set
Default Public Overridable Property Item(index As Integer) As Object

參數

index
Int32

在集合中,要取得或設定的項目索引。

屬性值

物件,表示集合中位於指定索引處的項目。

實作

屬性

例外狀況

index 參數小於零,或者大於等於 Count 類別的 ListBox.ObjectCollection 屬性值。

備註

您可以使用這個方法來取得 ListBox 儲存在集合內特定位置的專案。 若要判斷集合內特定專案的索引,請使用 IndexOf 方法。

適用於