Språk

HttpModuleActionCollection.Clear Metod

Definition

Tar bort alla HttpModuleAction objekt från samlingen.

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

Exempel

I följande exempel visas hur du rensar modulerna HttpModuleAction i samlingen.


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

Kommentarer

Den här metoden infogar ett clear direktiv i lämplig del av konfigurationsfilen för att rensa alla referenser till element som definierats i en konfigurationsfil på högre nivå. Alla element som definierats i lämpligt avsnitt i den aktuella konfigurationsfilen tas bort.

Gäller för