ListView.CheckedListViewItemCollection.Item[] 屬性

定義

取得集合中的項目。

多載

Item[String]

取得集合中具有指定索引鍵的項目。

Item[Int32]

取得集合中位於指定索引處的項目。

Item[String]

取得集合中具有指定索引鍵的項目。

public:
 virtual property System::Windows::Forms::ListViewItem ^ default[System::String ^] { System::Windows::Forms::ListViewItem ^ get(System::String ^ key); };
public virtual System.Windows.Forms.ListViewItem this[string key] { get; }
member this.Item(string) : System.Windows.Forms.ListViewItem
Default Public Overridable ReadOnly Property Item(key As String) As ListViewItem

參數

key
String

要從集合中擷取之項目的索引鍵。

屬性值

ListViewItem

ListViewItem,表示集合中具有指定索引的項目。

例外狀況

擁有人 ListView 位於虛擬模式中。

備註

Item[]如果 參數為 null 或空白,則會 keynull 回 。

屬性 Name 會對應至 中 ListView.CheckedListViewItemCollection 專案的索引鍵。

適用於

Item[Int32]

取得集合中位於指定索引處的項目。

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

參數

index
Int32

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

屬性值

ListViewItem

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

例外狀況

index 參數小於 0,或者大於等於 CountListView.CheckedListViewItemCollection 屬性值。

ListView 處於虛擬模式中。

備註

此索引子可讓您從 ListView.CheckedListViewItemCollection 取得特定專案。 儲存在此集合中的專案是 中的 ListView.ListViewItemCollection ListView 專案,代表 中 ListView 已核取的專案。

適用於