Sdílet prostřednictvím


AuthorizationRuleCollection.Set(Int32, AuthorizationRule) Metoda

Definice

Přidá zadaný AuthorizationRule objekt do kolekce v zadaném indexu.

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)

Parametry

index
Int32

Umístění indexu, do kterého chcete přidat zadaný AuthorizationRuleCollection objekt.

rule
AuthorizationRule

Objekt AuthorizationRule , který se má přidat.

Příklady

Následující příklad kódu ukazuje, jak použít metodu 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)

Platí pro