語言

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 方法。

適用於