語言

OutputCacheProfileCollection.Remove(String) 方法

定義

從集合中移除 OutputCacheProfile 指定名稱的物件。

public:
 void Remove(System::String ^ name);
public void Remove(string name);
member this.Remove : string -> unit
Public Sub Remove (name As String)

參數

name
String

要從集合中移除的元素名稱 OutputCacheProfile 。

例外狀況

集合中沒有 OutputCacheProfile 包含指定金鑰的物件,元素已被移除,或集合是唯讀。

範例

下列程式代碼範例示範如何使用 Remove 方法。

// Remove the output profile with the specified name.
outputCacheProfiles.Remove("MyCacheProfile");
' Remove the output profile with the specified name.
  outputCacheProfiles.Remove("MyCacheProfile")

備註

此 Remove 方法會將 remove 一個元素插入設定檔的適當區段,以對應在較高階設定檔中定義的元素。 如果該元素在目前設定檔的適當區段中被定義,該元素的條目會從設定檔中移除。 要移除的物件必須存在於集合中。

適用於

另請參閱