Aracılığıyla paylaş


HttpModuleActionCollection.IndexOf(HttpModuleAction) Yöntem

Tanım

Belirtilen HttpModuleAction modülün koleksiyon dizinini alır.

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

Parametreler

action
HttpModuleAction

HttpModuleAction Koleksiyon dizininin alındığı modül.

Döndürülenler

Belirtilen modülün koleksiyon dizini değeri.

Örnekler

Aşağıdaki örnekte bir HttpModuleAction modül koleksiyonu dizininin nasıl alın aldığı gösterilmektedir.

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

Açıklamalar

Bu yöntemi kullanmadan önce uygun ada ve türe sahip bir HttpModuleAction modül tanımlamanız gerekir. Daha sonra bu modül nesnesini kullanarak koleksiyon dizinini alabilirsiniz.

Şunlara uygulanır