AuthorizationRuleCollection.Set(Int32, AuthorizationRule) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Lägger till det angivna AuthorizationRule objektet i samlingen i det angivna indexet.
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)
Parametrar
- index
- Int32
Indexplatsen där det angivna AuthorizationRuleCollection objektet ska läggas till.
- rule
- AuthorizationRule
Objektet AuthorizationRule som ska läggas till.
Exempel
I följande kodexempel visas hur metoden Set används.
// 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)