語言

HttpHandlerActionCollection.Clear 方法

定義

移除收藏中的所有 HttpHandlerAction 物件。

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

範例

以下程式碼範例說明如何清除 HttpHandlerAction 集合中包含的物件。 此程式碼範例是本類別更大範例 HttpHandlerActionCollection 的一部分。

// Clear all CustomError objects from the Handlers property HttpHandlerAction collection.
httpHandlers.Clear();

' Clear all CustomError objects from the Handlers property HttpHandlerAction collection.
httpHandlers.Clear()

備註

此方法會在 clear 設定檔的適當區段插入指令,清除所有對高階設定檔中定義元素的參考。 目前設定檔中適當區段中定義的所有元素都會被移除。

適用於