OutputCacheProfileCollection.Remove(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从 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 到配置文件的相应节中,以用于在更高级别配置文件中定义的任何元素。 如果元素在当前配置文件的相应节中定义,则会从配置文件中删除其条目。 要删除的对象必须存在于集合中。