HttpModuleActionCollection.Clear Metode

Definisi

Menghapus semua HttpModuleAction objek dari koleksi.

public:
 void Clear();
public void Clear();
member this.Clear : unit -> unit
Public Sub Clear ()

Contoh

Contoh berikut menunjukkan cara menghapus modul yang HttpModuleAction terkandung dalam koleksi.


// Clear the collection.
if (!httpModulesSection.SectionInformation.IsLocked)
{
    modulesCollection.Clear();
    configuration.Save();
}
' Clear the collection.
If Not httpModulesSection.SectionInformation.IsLocked Then
    modulesCollection.Clear()
    configuration.Save()
End If

Keterangan

Metode ini menyisipkan arahan clear ke bagian yang sesuai dari file konfigurasi untuk menghapus semua referensi ke elemen yang ditentukan dalam file konfigurasi tingkat yang lebih tinggi. Semua elemen yang ditentukan di bagian yang sesuai dari file konfigurasi saat ini dihapus.

Berlaku untuk