AuthorizationRuleCollection.Set(Int32, AuthorizationRule) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds the specified AuthorizationRule object to the collection at the specified 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
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.
// 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)
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應