SubMenuStyleCollection.Contains Method (SubMenuStyle)


Determines whether a SubMenuStyleCollection collection contains a specific SubMenuStyle instance.

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

public bool Contains(
	SubMenuStyle style


Type: System.Web.UI.WebControls.SubMenuStyle

The SubMenuStyle instance to locate in the SubMenuStyleCollection collection.

Return Value

Type: System.Boolean

true if the SubMenuStyle instance is found in the SubMenuStyleCollection collection; otherwise, false. If null is passed as the style parameter, false is returned.

The OnValidate method is called to validate the style parameter before the SubMenuStyleCollection collection is checked.

.NET Framework
Available since 2.0
Return to top