Aracılığıyla paylaş


AuthorizationRuleCollection.Set(Int32, AuthorizationRule) Yöntem

Tanım

Belirtilen nesneyi belirtilen AuthorizationRule dizindeki koleksiyona ekler.

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)

Parametreler

index
Int32

Belirtilen AuthorizationRuleCollection nesnenin ekleneceği dizin konumu.

rule
AuthorizationRule

AuthorizationRule Eklenecek nesne.

Örnekler

Aşağıdaki kod örneğinde yönteminin nasıl kullanılacağı gösterilmektedir 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)

Şunlara uygulanır