ListItemCollection.Contains Method (ListItem)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Determines whether the collection contains the specified item.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public bool Contains(
	ListItem item
)

Parameters

item
Type: System.Web.UI.WebControls.ListItem

A ListItem to search for in the collection.

Return Value

Type: System.Boolean

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

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

.NET Framework
Available since 1.1
Return to top
Show: