This documentation is archived and is not being maintained.

ListViewItem.ListViewSubItemCollection.Contains Method

Determines whether the specified subitem is located in the collection.

[Visual Basic]
Public Function Contains( _
   ByVal subItem As ListViewItem.ListViewSubItem _
) As Boolean
public bool Contains(
 ListViewItem.ListViewSubItem subItem
public: bool Contains(
 ListViewItem.ListViewSubItem* subItem
public function Contains(
   subItem : ListViewItem.ListViewSubItem
) : Boolean;


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

Return Value

true if the subitem is contained in the collection; otherwise, false.


The Contains method enables you to determine whether a ListViewItem.ListViewSubItem is a member of the collection. Once you know that the subitem is in the collection, you can use the IndexOf method to determine the position of the subitem in the collection.


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