AuthorizationRuleCollection.IndexOf Method (AuthorizationRule)

 

Gets the collection index of the specified AuthorizationRule object.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

Public Function IndexOf (
	rule As AuthorizationRule
) As Integer

Parameters

rule
Type: System.Web.Configuration.AuthorizationRule

The AuthorizationRule object whose index is returned.

Return Value

Type: System.Int32

The index of the specified AuthorizationRule object.

The following code example shows how to use the IndexOf method.

' Get the rule collection index.
  Dim ruleIndex As System.Int32 = _
  authorizationSection.Rules.IndexOf(authorizationRule)

.NET Framework
Available since 2.0
Return to top
Show: