CookieCollection.Remove(Cookie) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The cookie to remove from the CookieCollection.
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.
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.
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: