AuthorizationRuleCollection.Set(Int32, AuthorizationRule) Method

Definition

Adds the specified AuthorizationRule object to the collection at the specified index.

C#
public void Set(int index, System.Web.Configuration.AuthorizationRule rule);

Parameters

index
Int32

The index location at which to add the specified AuthorizationRuleCollection object.

rule
AuthorizationRule

The AuthorizationRule object to be added.

Examples

The following code example shows how to use the Set method.

C#
// 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);

Applies to

Produkt Versionen
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1