This documentation is archived and is not being maintained.

ListItemCollection.Contains Method

Determines whether the collection contains the specified item.

[Visual Basic]
Public Function Contains( _
   ByVal item As ListItem _
) As Boolean
[C#]
public bool Contains(
 ListItem item
);
[C++]
public: bool Contains(
 ListItem* item
);
[JScript]
public function Contains(
   item : ListItem
) : Boolean;

Parameters

item
A ListItem to search for in the collection.

Return Value

true if the collection contains the specified item; otherwise, false.

Remarks

Use the Contains method to determine whether the ListItem specified by the item parameter is in the collection.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

ListItemCollection Class | ListItemCollection Members | System.Web.UI.WebControls Namespace | ListItem

Show: