AuthorizationRuleCollection.IndexOf(AuthorizationRule) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft den Auflistungsindex des angegebenen AuthorizationRule Objekts ab.
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
Parameter
- rule
- AuthorizationRule
Das AuthorizationRule Objekt, dessen Index zurückgegeben wird.
Gibt zurück
Der Index des angegebenen AuthorizationRule Objekts.
Beispiele
Das folgende Codebeispiel zeigt, wie die IndexOf Methode verwendet wird.
// 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)