HttpCookieCollection.Remove(String) 方法
定义
从集合中移除具有指定名称的 Cookie。Removes the cookie with the specified name from the collection.
public:
void Remove(System::String ^ name);
public void Remove (string name);
member this.Remove : string -> unit
Public Sub Remove (name As String)
参数
- name
- String
要从集合中移除的 Cookie 名称。The name of the cookie to remove from the collection.
示例
下面的示例从集合中删除 cookie。The following example removes a cookie from the collection.
MyCookieCollection.Remove(MyCookie);
MyCookieCollection.Remove(MyCookie)
注解
如果 name
集合中不存在具有指定的 cookie,则不会引发异常。If a cookie with the specified name
does not exist in the collection, no exception is thrown.