HttpModuleActionCollection.Clear 方法

定義

移除收藏中的所有 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 設定檔的適當區段插入指令,清除所有對高階設定檔中定義元素的參考。 目前設定檔中適當區段中定義的所有元素都會被移除。

適用於