ListView.SelectedListViewItemCollection.Item[] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從收藏中取得一件物品。
多載
| 名稱 | Description |
|---|---|
| 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
要從收藏中取回的物品名稱。
屬性值
備註
該Name性質對應於 中 a 的ListViewItemListView.SelectedListViewItemCollection鍵。
關鍵比較並不區分大小寫。 若 key 參數為 null 或 為空字串,則 Item[] 回傳 null。
適用於
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
集合中要檢索項目的索引。
屬性值
A ListViewItem 代表集合中指定索引處的項目。
例外狀況
參數index小於零或大於或等於 的Count性質值ListView.SelectedListViewItemCollection。
備註
這個索引器讓你能從 中取得特定項目 ListView.SelectedListViewItemCollection。 集合中儲存的項目是 中ListView.ListViewItemCollection代表 中選定項目ListView的項目ListView。