HttpModuleActionCollection.IndexOf(HttpModuleAction) Methode

Definition

Ruft den Auflistungsindex des angegebenen HttpModuleAction Moduls ab.

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

Parameter

action
HttpModuleAction

Das HttpModuleAction Modul, für das der Sammlungsindex abgerufen werden soll.

Gibt zurück

Der Indexwert der Auflistung für das angegebene Modul.

Beispiele

Das folgende Beispiel zeigt, wie Sie einen Modulauflistungsindex HttpModuleAction abrufen.

// 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)

Hinweise

Bevor Sie diese Methode verwenden, müssen Sie ein HttpModuleAction Modul mit dem richtigen Namen und Typ identifizieren. Anschließend können Sie dieses Modulobjekt verwenden, um den Auflistungsindex abzurufen.

Gilt für: