CookieCollection.Remove(Cookie) CookieCollection.Remove(Cookie) CookieCollection.Remove(Cookie) Method

Definition

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

Parameters

cookie
Cookie Cookie Cookie

The cookie to remove from the CookieCollection.

Returns

true if cookie was successfully removed from the CookieCollection; otherwise, false. This method also returns false if item is not found in the original collection.

Implements

Remarks

The cookie is determined to be part of the collection if Name, Domain and Path match.

The comparison for Name and Domain is case-insensitive.

The comparison for Path is case-sensitive.

Applies to