Provides a set of properties and methods that are used to manage cookies. This class cannot be inherited.
Assembly: System (in System.dll)
Thetype exposes the following members.
|Cookie()||Initializes a new instance of the class.|
|Cookie(String, String)||Initializes a new instance of the class with a specified Name and Value.|
|Cookie(String, String, String)||Initializes a new instance of the class with a specified Name, Value, and Path.|
|Cookie(String, String, String, String)||Initializes a new instance of the class with a specified Name, Value, Path, and Domain.|
|Comment||Gets or sets a comment that the server can add to a .|
|CommentUri||Gets or sets a URI comment that the server can provide with a .|
|Discard||Gets or sets the discard flag set by the server.|
|Domain||Gets or sets the URI for which the is valid.|
|Expired||Gets or sets the current state of the .|
|Expires||Gets or sets the expiration date and time for the as a DateTime.|
|HttpOnly||Determines whether a page script or other active content can access this cookie.|
|Name||Gets or sets the name for the .|
|Path||Gets or sets the URIs to which the applies.|
|Port||Gets or sets a list of TCP ports that the applies to.|
|Secure||Gets or sets the security level of a .|
|TimeStamp||Gets the time when the cookie was issued as a DateTime.|
|Value||Gets or sets the Value for the .|
|Version||Gets or sets the version of HTTP state maintenance to which the cookie conforms.|
|Equals||Overrides the Object.Equals method. (Overrides Object.Equals(Object).)|
|GetHashCode||Overrides the Object.GetHashCode method. (Overrides Object.GetHashCode().)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|ToString||Overrides the Object.ToString method. (Overrides Object.ToString().)|
The class is used by a client application to retrieve information about cookies that are received with HTTP responses. The following cookie formats are supported during parsing of the HTTP response headers: the original Netscape specification, RFC 2109, and RFC 2965.
For a list of initial property values for an instance of , see the various constructors.
.NET FrameworkSupported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0
.NET Framework Client ProfileSupported in: 4, 3.5 SP1
Portable Class LibrarySupported in: Portable Class Library
.NET for Windows Store appsSupported in: Windows 8
.NET for Windows Phone appsSupported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.