Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ListViewItem.ListViewSubItemCollection.IndexOf Method

Returns the index within the collection of the specified subitem.

[Visual Basic]
Public Function IndexOf( _
   ByVal subItem As ListViewItem.ListViewSubItem _
) As Integer
[C#]
public int IndexOf(
 ListViewItem.ListViewSubItem subItem
);
[C++]
public: int IndexOf(
 ListViewItem.ListViewSubItem* subItem
);
[JScript]
public function IndexOf(
   subItem : ListViewItem.ListViewSubItem
) : int;

Parameters

subItem
A ListViewItem.ListViewSubItem representing the subitem to locate in the collection.

Return Value

The zero-based index of the subitem's location in the collection. If the subitem is not located in the collection, the return value is negative one (-1).

Remarks

The IndexOf method enables you to determine the position of a subitem in the collection. To determine whether a subitem is contained in the collection before calling this method, use the Contains method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

ListViewItem.ListViewSubItemCollection Class | ListViewItem.ListViewSubItemCollection Members | System.Windows.Forms Namespace | Contains

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.