Språk

HttpModuleActionCollection.IndexOf(HttpModuleAction) Metod

Definition

Hämtar samlingsindexet för den angivna HttpModuleAction modulen.

public:
 int IndexOf(System::Web::Configuration::HttpModuleAction ^ action);
public int IndexOf(System.Web.Configuration.HttpModuleAction action);
member this.IndexOf : System.Web.Configuration.HttpModuleAction -> int
Public Function IndexOf (action As HttpModuleAction) As Integer

Parametrar

action
HttpModuleAction

Modulen HttpModuleAction som samlingsindexet ska hämtas för.

Returer

Samlingsindexvärdet för den angivna modulen.

Exempel

I följande exempel visas hur du hämtar ett HttpModuleAction modulsamlingsindex.

// Set the module object.
HttpModuleAction ModuleAction1 = 
    new HttpModuleAction("MyModule1Name",
    "MyModule1Type");
// Get the module collection index.
int moduleIndex = modulesCollection.IndexOf(ModuleAction1);

' Set the module object.
Dim ModuleAction1 _
As New HttpModuleAction( _
"MyModule1Name", "MyModule1Type")
' Get the module collection index.
Dim moduleIndex As Integer = _
modulesCollection.IndexOf(ModuleAction1)

Kommentarer

Innan du använder den här metoden måste du identifiera en HttpModuleAction modul med rätt namn och typ. Du kan sedan använda det här modulobjektet för att hämta dess samlingsindex.

Gäller för