HttpModuleActionCollection.Clear 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
移除收藏中的所有 HttpModuleAction 物件。
public:
void Clear();
public void Clear();
member this.Clear : unit -> unit
Public Sub Clear ()
範例
以下範例說明如何清除 HttpModuleAction 集合中包含的模組。
// 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
備註
此方法會在 clear 設定檔的適當區段插入指令,清除所有對高階設定檔中定義元素的參考。 目前設定檔中適當區段中定義的所有元素都會被移除。