IndexOf Method

RoleGroupCollection.IndexOf Method (RoleGroup)


Searches the collection and returns the zero-based index of the first occurrence of the specified RoleGroup.

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

public int IndexOf(
	RoleGroup group


Type: System.Web.UI.WebControls.RoleGroup

The RoleGroup to locate in the collection.

Return Value

Type: System.Int32

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

The IndexOf method performs a linear search; therefore the average execution time depends on the number of members in the collection.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft