AuthorizationRuleCollection.IndexOf(AuthorizationRule) Methode

Definitie

Hiermee haalt u de verzamelingsindex van het opgegeven AuthorizationRule object op.

public:
 int IndexOf(System::Web::Configuration::AuthorizationRule ^ rule);
public int IndexOf(System.Web.Configuration.AuthorizationRule rule);
member this.IndexOf : System.Web.Configuration.AuthorizationRule -> int
Public Function IndexOf (rule As AuthorizationRule) As Integer

Parameters

rule
AuthorizationRule

Het AuthorizationRule object waarvan de index wordt geretourneerd.

Retouren

De index van het opgegeven AuthorizationRule object.

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de IndexOf methode gebruikt.

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

Van toepassing op