HttpModuleActionCollection.IndexOf(HttpModuleAction) Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan indeks koleksi modul yang ditentukan HttpModuleAction .
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
Modul HttpModuleAction untuk mendapatkan indeks koleksi.
Mengembalikan
Nilai indeks koleksi untuk modul yang ditentukan.
Contoh
Contoh berikut menunjukkan cara mendapatkan HttpModuleAction indeks koleksi modul.
// 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)
Keterangan
Sebelum menggunakan metode ini, Anda harus mengidentifikasi modul dengan nama dan jenis yang HttpModuleAction tepat. Anda kemudian dapat menggunakan objek modul ini untuk mendapatkan indeks koleksinya.