Partager via


AuthorizationRuleCollection.Set(Int32, AuthorizationRule) Méthode

Définition

Ajoute à la collection l'objet AuthorizationRule spécifié à l'index spécifié.

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)

Paramètres

index
Int32

Emplacement d'index où ajouter l'objet AuthorizationRuleCollection spécifié.

rule
AuthorizationRule

Objet AuthorizationRule à ajouter.

Exemples

L'exemple de code suivant montre comment utiliser la méthode Set.

// 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)

S’applique à