ListView.SelectedListViewItemCollection.Item[] 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从集合中获取项。
重载
| 名称 | 说明 |
|---|---|
| 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 指定键的键。
注解
该 Name 属性对应于中某个 ListViewItem 项的 ListView.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
要检索的集合中项的索引。
属性值
一个 ListViewItem 表示位于集合中指定索引处的项。
例外
参数 index 小于零或大于或等于 Count 该 ListView.SelectedListViewItemCollection属性的值。
注解
使用此索引器可从中 ListView.SelectedListViewItemCollection获取特定项。 存储在集合中的项ListView.ListViewItemCollectionListView是表示所选项的项。ListView