Partilhar via


AuthorizationRuleCollection.Set(Int32, AuthorizationRule) Método

Definição

Adiciona o objeto AuthorizationRule especificado à coleção no índice especificado.

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)

Parâmetros

index
Int32

O local do índice no qual adicionar o objeto AuthorizationRuleCollection especificado.

rule
AuthorizationRule

O objeto AuthorizationRule a ser adicionado.

Exemplos

O exemplo de código a seguir mostra como usar o método 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)

Aplica-se a