HttpModuleActionCollection.RemoveAt(Int32) Metode

Definisi

HttpModuleAction Menghapus modul pada indeks yang ditentukan dari koleksi.

public:
 void RemoveAt(int index);
public void RemoveAt(int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

Parameter

index
Int32

Indeks modul yang HttpModuleAction akan dihapus.

Pengecualian

Tidak ada HttpModuleAction objek pada indeks yang ditentukan dalam koleksi, elemen telah dihapus, atau koleksi bersifat baca-saja.

Contoh

Contoh berikut menunjukkan cara menghapus HttpModuleAction modul dari koleksi.


// Remove the module from the collection.
if (!httpModulesSection.SectionInformation.IsLocked)
{
    modulesCollection.RemoveAt(0);
    configuration.Save();
}
' Remove the module from the collection.
If Not httpModulesSection.SectionInformation.IsLocked Then
    modulesCollection.RemoveAt(0)
    configuration.Save()
End If

Keterangan

Metode ini menyisipkan <remove> elemen ke bagian yang sesuai dari file konfigurasi untuk elemen apa pun yang ditentukan dalam file konfigurasi tingkat yang lebih tinggi. Jika elemen didefinisikan di bagian yang sesuai dari file konfigurasi saat ini, entrinya dihapus dari file konfigurasi. Objek yang akan dihapus harus ada dalam koleksi.

Berlaku untuk