System.Web.UI.WebControls.MenuItemCollection.Contains Method

Determines whether the specified System.Web.UI.WebControls.MenuItem object is in the collection.

Syntax

public bool Contains (MenuItem child)

Parameters

child
Documentation for this section has not yet been entered.

Returns

true if the specified System.Web.UI.WebControls.MenuItem object is contained in the collection; otherwise, false.

Remarks

Use the MenuItemCollection.Contains(MenuItem) method to determine whether a System.Web.UI.WebControls.MenuItem object is contained in the current System.Web.UI.WebControls.MenuItemCollection object. The System.Web.UI.WebControls.MenuItem and its properties is compared with the passed in value. This method is commonly used to test for the existence of a System.Web.UI.WebControls.MenuItem object before performing a task, such as adding or removing a menu item from the collection.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0