ListView.ListViewItemCollection.IList.Item[Int32] ListView.ListViewItemCollection.IList.Item[Int32] ListView.ListViewItemCollection.IList.Item[Int32] Property

定义

获取或设置集合中指定索引处的 ListViewItemGets or sets the ListViewItem at the specified index within the collection.

property System::Object ^ System::Collections::IList::Item[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };
object System.Collections.IList.Item[int index] { get; set; }
 Property Item(index As Integer) As Object Implements IList.Item

参数

index
Int32 Int32 Int32

要获取的元素的索引(索引从零开始)。The zero-based index of the element to get.

属性值

一个 ListViewItem,表示位于集合内指定索引处的项。A ListViewItem that represents the item located at the specified index within the collection.

实现

异常

索引参数小于零或大于等于 CountListView.ListViewItemCollection 属性的值。The index parameter is less than 0 or greater than or equal to the value of the Count property of the ListView.ListViewItemCollection.

注解

item参数可以设置为任何类型。The item parameter can be set to any type. 如果item ListView.ListViewItemCollection是,则会将其添加到中。ListViewItemIf item is a ListViewItem, it is added to the ListView.ListViewItemCollection. 如果item是另一种类型, ListViewItem则将创建一个新的, ToString其中包含item的方法中的字符串。If item is another type, a new ListViewItem is created containing the string from the ToString method of item.

适用于