CookieCollection.Remove(Cookie) 方法

定义

CookieCollection 中移除指定的 cookie。Removes the specified cookie from the CookieCollection.

public:
 virtual bool Remove(System::Net::Cookie ^ cookie);
public bool Remove (System.Net.Cookie cookie);
abstract member Remove : System.Net.Cookie -> bool
override this.Remove : System.Net.Cookie -> bool
Public Function Remove (cookie As Cookie) As Boolean

参数

cookie
Cookie

要从 CookieCollection 移除的 cookie。The cookie to remove from the CookieCollection.

返回

Boolean

如果从 true 中成功移除 cookie,则为 CookieCollection;否则为 falsetrue if cookie was successfully removed from the CookieCollection; otherwise, false. 如果在原始集合中找不到该项,则此方法也会返回 falseThis method also returns false if item is not found in the original collection.

实现

注解

cookie如果 Name 、和匹配,则确定是集合的一部分 Domain PathThe cookie is determined to be part of the collection if Name, Domain and Path match.

和的比较 Name Domain 不区分大小写。The comparison for Name and Domain is case-insensitive.

的比较 Path 区分大小写。The comparison for Path is case-sensitive.

适用于