Compartir a través de


AuthorizationRuleCollection.Set(Int32, AuthorizationRule) Método

Definición

Agrega el objeto AuthorizationRule especificado a la colección en el í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

Ubicación del índice en el que se va a agregar el objeto AuthorizationRuleCollection especificado.

rule
AuthorizationRule

El objeto AuthorizationRule que se va a agregar.

Ejemplos

En el ejemplo de código siguiente, se muestra cómo se utiliza el 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)

Se aplica a