CookieCollection.Contains(Cookie) Method

Definition

Determines whether the specified cookie is in the CookieCollection.

C#
public bool Contains(System.Net.Cookie cookie);

Parameters

cookie
Cookie

The cookie to locate in the CookieCollection.

Returns

true if the specified cookie is found in the CookieCollection; otherwise, false.

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

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9