ListBox.SelectedIndexCollection.Item[Int32] 屬性

定義

取得這個集合中指定索引處的索引值。

public:
 property int default[int] { int get(int index); };
public int this[int index] { get; }
member this.Item(int) : int
Default Public ReadOnly Property Item(index As Integer) As Integer

參數

index
Int32

要從集合中取得的項目索引。

屬性值

Int32

ListBox.ObjectCollection 的索引值,該值儲存在指定的位置中。

例外狀況

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

備註

此索引子可讓您從 ListBox.SelectedIndexCollection 取得特定的選取索引。 儲存在集合中的索引是 的索引 ListBox.ObjectCollection ListBox ,代表 中 ListBox 選取的專案。

適用於