AuthorizationRuleCollection.IndexOf(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.
Gets the collection index of the specified AuthorizationRule object.
public:
int IndexOf(System::Web::Configuration::AuthorizationRule ^ rule);
public int IndexOf (System.Web.Configuration.AuthorizationRule rule);
member this.IndexOf : System.Web.Configuration.AuthorizationRule -> int
Public Function IndexOf (rule As AuthorizationRule) As Integer
Parameters
- rule
- AuthorizationRule
The AuthorizationRule object whose index is returned.
Returns
The index of the specified AuthorizationRule object.
Examples
The following code example shows how to use the IndexOf method.
// Get the rule collection index.
System.Int32 ruleIndex =
authorizationSection.Rules.IndexOf(authorizationRule);
' Get the rule collection index.
Dim ruleIndex As System.Int32 = _
authorizationSection.Rules.IndexOf(authorizationRule)
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.