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
[C#]
public bool Contains(
 ListViewItem item
);
[C++]
public: bool Contains(
 ListViewItem* item
);
[JScript]
public function Contains(
   item : ListViewItem
) : Boolean;

Parameters

item
A ListViewItem representing the item to locate in the collection.

Return Value

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

Remarks

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.

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

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

Show:
© 2015 Microsoft