Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ListView.ListViewItemCollection.Contains Method

Determines whether the specified item is located in the collection.

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


A ListViewItem representing the item to locate in the collection.

Return Value

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


The Contains method enables you to determine whether a ListViewItem is a member of the collection. Once you know that the item is the collection, you can use the IndexOf method to determine the position of the item 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

ListView.ListViewItemCollection Class | ListView.ListViewItemCollection Members | System.Windows.Forms Namespace | IndexOf

© 2015 Microsoft