AuthorizationRuleCollection.Set(Int32, AuthorizationRule) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee voegt u het opgegeven AuthorizationRule object toe aan de verzameling op de opgegeven index.
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)
Parameters
- index
- Int32
De indexlocatie waarop het opgegeven AuthorizationRuleCollection object moet worden toegevoegd.
- rule
- AuthorizationRule
Het AuthorizationRule object dat moet worden toegevoegd.
Voorbeelden
In het volgende codevoorbeeld ziet u hoe u de Set methode gebruikt.
// 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)