Editar

Partilhar via


MenuItemStyleCollection.IndexOf(MenuItemStyle) Method

Definition

Determines the index of the specified MenuItemStyle object in the collection.

public:
 int IndexOf(System::Web::UI::WebControls::MenuItemStyle ^ style);
public int IndexOf (System.Web.UI.WebControls.MenuItemStyle style);
member this.IndexOf : System.Web.UI.WebControls.MenuItemStyle -> int
Public Function IndexOf (style As MenuItemStyle) As Integer

Parameters

style
MenuItemStyle

The MenuItemStyle to locate.

Returns

The zero-based index of the first occurrence of the specified MenuItemStyle, if found; otherwise, -1.

Remarks

Use the IndexOf method to determine the zero-based index of the specified MenuItemStyle object in the collection. If the node is not in the collection, the method returns -1.

Note

If the specified MenuItemStyle object appears multiple times in the collection, the index of the first occurrence is returned.

Applies to

See also