ListBox.SelectedObjectCollection.Item[Int32] 屬性

定義

取得集合中位於指定索引處的項目。Gets the item at the specified index within the collection.

public:
 property System::Object ^ default[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };
[System.ComponentModel.Browsable(false)]
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

要從集合中擷取的項目索引。The index of the item in the collection to retrieve.

屬性值

物件,表示集合中位於指定索引處的項目。An object representing the item located at the specified index within the collection.

實作

屬性

例外狀況

index 參數小於零,或者大於等於 Count 類別的 ListBox.SelectedObjectCollection 屬性值。The index parameter is less than zero or greater than or equal to the value of the Count property of the ListBox.SelectedObjectCollection class.

備註

此索引子可讓您從 ListBox.SelectedObjectCollection取得特定專案。This indexer enables you to get a specific item from the ListBox.SelectedObjectCollection. 儲存在此集合中的專案是 ListBoxListBox.ObjectCollection 內的專案,代表 ListBox中的選取專案。The item stored in this collection is an item within the ListBox.ObjectCollection of the ListBox that represents a selected item in the ListBox.

適用於