ListView.ListViewItemCollection.IList.IndexOf(Object) ListView.ListViewItemCollection.IList.IndexOf(Object) ListView.ListViewItemCollection.IList.IndexOf(Object) Method

定义

返回指定的项在集合中的索引。Returns the index within the collection of the specified item.

 virtual int System.Collections.IList.IndexOf(System::Object ^ item) = System::Collections::IList::IndexOf;
int IList.IndexOf (object item);
Function IndexOf (item As Object) As Integer Implements IList.IndexOf

参数

item
Object Object Object

一个 ListViewItem,表示要在集合中查找的项。A ListViewItem that represents the item to locate in the collection.

返回

如果该项位于集合中,则为该项从零开始的索引;否则为 -1。The zero-based index of the item if it is in the collection; otherwise, -1.

实现

适用于