System.Web.UI.WebControls.RoleGroupCollection.IndexOf Method

Searches the collection and returns the zero-based index of the first occurrence of the specified System.Web.UI.WebControls.RoleGroup.

Syntax

public int IndexOf (RoleGroup group)

Parameters

group
The System.Web.UI.WebControls.RoleGroup to locate in the collection.

Returns

The zero-based index of the first occurrence of group within the entire System.Web.UI.WebControls.RoleGroupCollection, if found; otherwise, -1.

Remarks

The RoleGroupCollection.IndexOf(RoleGroup) method performs a linear search; therefore the average execution time depends on the number of members in 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