ListBox.ObjectCollection.Item[Int32] ListBox.ObjectCollection.Item[Int32] ListBox.ObjectCollection.Item[Int32] ListBox.ObjectCollection.Item[Int32] Property

定義

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

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

參數

index
Int32 Int32 Int32 Int32

在集合中,要取得或設定的項目索引。The index of the item in the collection to get or set.

屬性值

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

實作

例外狀況

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

備註

您可以使用這個方法來取得儲存ListBox在集合內特定位置的專案。You can use this method to obtain the ListBox item stored at a specific location within the collection. 若要判斷集合中特定專案的索引,請使用IndexOf方法。To determine the index of a specific item within the collection, use the IndexOf method.

適用於