ListView::ListViewItemCollection::IndexOf Method (ListViewItem^)
.NET Framework (current version)
Returns the index within the collection of the specified item.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- item
-
Type:
System.Windows.Forms::ListViewItem^
A ListViewItem representing the item to locate in the collection.
Return Value
Type: System::Int32The zero-based index of the item's location in the collection; otherwise, -1 if the item is not located in the collection.
The IndexOf method enables you to determine the position of an item in the collection. To determine whether an item is contained in the collection before calling this method, use the Contains method.
.NET Framework
Available since 1.1
Available since 1.1
Show: