System.Web.UI.WebControls.MenuItemStyleCollection.Contains Method

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

Syntax

public bool Contains (MenuItemStyle style)

Parameters

style
The System.Web.UI.WebControls.MenuItemStyle to find.

Returns

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

Remarks

Use the MenuItemStyleCollection.Contains(MenuItemStyle) method to determine whether a System.Web.UI.WebControls.MenuItemStyle object is contained in the collection. This method is commonly used to test for the existence of a System.Web.UI.WebControls.MenuItemStyle object before performing a task, such as adding or removing a menu item style 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