AuthorizationRuleCollection.Set Method (Int32, AuthorizationRule)

 

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

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

public void Set(
	int index,
	AuthorizationRule rule
)

Parameters

index
Type: System.Int32

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

rule
Type: System.Web.Configuration.AuthorizationRule

The AuthorizationRule object to be added.

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

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

.NET Framework
Available since 2.0
Return to top
Show: