AuthorizationRuleCollection.Set(Int32, 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.
Fügt das angegebene AuthorizationRule Objekt der Auflistung am angegebenen Index hinzu.
public:
void Set(int index, System::Web::Configuration::AuthorizationRule ^ rule);
public void Set(int index, System.Web.Configuration.AuthorizationRule rule);
member this.Set : int * System.Web.Configuration.AuthorizationRule -> unit
Public Sub Set (index As Integer, rule As AuthorizationRule)
Parameter
- index
- Int32
Die Indexposition, an der das angegebene AuthorizationRuleCollection Objekt hinzugefügt werden soll.
- rule
- AuthorizationRule
Das AuthorizationRule hinzuzufügende Objekt.
Beispiele
Das folgende Codebeispiel zeigt, wie die Set Methode verwendet wird.
// Using the AuthorizationRuleCollection Set method.
// Define the rule to add to the collection.
// Define the collection index.
System.Int32 rIndex = 0;
// Set the rule in the collection.
authorizationRuleCollection.Set(rIndex,
authorizationRule);
' Using the AuthorizationRuleCollection Set method.
' Define the rule to add to the collection.
' Define the collection index.
Dim rIndex As System.Int32 = 0
' Set the rule in the collection.
authorizationRuleCollection.Set(rIndex, _
authorizationRule)