System.Web.UI.WebControls.ListItemCollection.Contains Method

Determines whether the collection contains the specified item.

Syntax

public bool Contains (ListItem item)

Parameters

item
A System.Web.UI.WebControls.ListItem to search for in the collection.

Returns

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

Remarks

Use the ListItemCollection.Contains(ListItem) method to determine whether the System.Web.UI.WebControls.ListItem specified by the item parameter is in the collection.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0