Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1450 lines (1302 sloc) 75.7 KB
<Type Name="Cookie" FullName="System.Net.Cookie">
<TypeSignature Language="C#" Value="public sealed class Cookie" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable sealed beforefieldinit Cookie extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Net.Cookie" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class Cookie" />
<TypeSignature Language="C++ CLI" Value="public ref class Cookie sealed" />
<TypeSignature Language="F#" Value="type Cookie = class" />
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<AttributeName>System.Serializable</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides a set of properties and methods that are used to manage cookies. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.Cookie> 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 <xref:System.Net.Cookie>, see the various <xref:System.Net.Cookie> constructors.
## Examples
The following example sends a request to a URL and displays the cookies returned in the response.
[!code-cpp[NCLCookies#1](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#1)]
[!code-csharp[NCLCookies#1](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#1)]
[!code-vb[NCLCookies#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Net.Cookie" /> class. In general, an application does not need to construct a <see cref="T:System.Net.Cookie" /> class because it is created automatically based on the Set-Cookie header received with the HTTP response.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Cookie ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.Cookie.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Cookie();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Net.Cookie" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default constructor initializes all fields to their default values, using empty strings ("") for `name`, `value`, `path`, and `domain`. Note that at least the <xref:System.Net.Cookie.Name%2A> property must be initialized before using an instance of the <xref:System.Net.Cookie> class.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Cookie (string name, string value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string name, string value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.Cookie.#ctor(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (name As String, value As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Cookie(System::String ^ name, System::String ^ value);" />
<MemberSignature Language="F#" Value="new System.Net.Cookie : string * string -&gt; System.Net.Cookie" Usage="new System.Net.Cookie (name, value)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Parameters>
<Parameter Name="name" Type="System.String" Index="0" FrameworkAlternate="xamarinmac-3.0" />
<Parameter Name="value" Type="System.String" Index="1" FrameworkAlternate="xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="name">The name of a <see cref="T:System.Net.Cookie" />. The following characters must not be used inside <paramref name="name" />: equal sign, semicolon, comma, newline (\n), return (\r), tab (\t), and space character. The dollar sign character ("$") cannot be the first character.</param>
<param name="value">The value of a <see cref="T:System.Net.Cookie" />. The following characters must not be used inside <paramref name="value" />: semicolon, comma.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.Cookie" /> class with a specified <see cref="P:System.Net.Cookie.Name" /> and <see cref="P:System.Net.Cookie.Value" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default for the `value` parameter uses the empty string ("").
The `value` parameter for a <xref:System.Net.Cookie> must not be a `null` reference (Nothing in Visual Basic). The semicolon (";") and comma (",") characters are reserved and cannot be passed in the `value` parameter unless the string passed in the `value` parameter is enclosed in double quotes. So the following example constructor would succeed, but when you try to add this <xref:System.Net.Cookie> to a <xref:System.Net.CookieContainer> instance with the <xref:System.Net.CookieContainer.Add(System.Net.Cookie)> or <xref:System.Net.CookieContainer.Add(System.Uri,System.Net.Cookie)> methods, the operation will fail and throw an exception:
```csharp
System.Net.Cookie cookie = new System.Net.Cookie("contoso", "123,456");
cookie.Domain = "contoso.com";
new CookieContainer().Add(cookie);
```
However, the following constructor with these special characters escaped will create a <xref:System.Net.Cookie> that can be added to a <xref:System.Net.CookieContainer> instance:
```csharp
System.Net.Cookie cookie = new System.Net.Cookie("contoso", "\"123,456\"");
cookie.Domain = "contoso.com";
new CookieContainer().Add(cookie);
```
The comma character is used as a delimiter between separate cookies on the same line.
]]></format>
</remarks>
<exception cref="T:System.Net.CookieException">The <paramref name="name" /> parameter is <see langword="null" />.
-or-
The <paramref name="name" /> parameter is of zero length.
-or-
The <paramref name="name" /> parameter contains an invalid character.
-or-
The <paramref name="value" /> parameter is <see langword="null" /> .
-or -
The <paramref name="value" /> parameter contains a string not enclosed in quotes that contains an invalid character.</exception>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Cookie (string name, string value, string path);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string name, string value, string path) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.Cookie.#ctor(System.String,System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (name As String, value As String, path As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Cookie(System::String ^ name, System::String ^ value, System::String ^ path);" />
<MemberSignature Language="F#" Value="new System.Net.Cookie : string * string * string -&gt; System.Net.Cookie" Usage="new System.Net.Cookie (name, value, path)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Parameters>
<Parameter Name="name" Type="System.String" Index="0" FrameworkAlternate="xamarinmac-3.0" />
<Parameter Name="value" Type="System.String" Index="1" FrameworkAlternate="xamarinmac-3.0" />
<Parameter Name="path" Type="System.String" Index="2" FrameworkAlternate="xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="name">The name of a <see cref="T:System.Net.Cookie" />. The following characters must not be used inside <paramref name="name" />: equal sign, semicolon, comma, newline (\n), return (\r), tab (\t), and space character. The dollar sign character ("$") cannot be the first character.</param>
<param name="value">The value of a <see cref="T:System.Net.Cookie" />. The following characters must not be used inside <paramref name="value" />: semicolon, comma.</param>
<param name="path">The subset of URIs on the origin server to which this <see cref="T:System.Net.Cookie" /> applies. The default value is "/".</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.Cookie" /> class with a specified <see cref="P:System.Net.Cookie.Name" />, <see cref="P:System.Net.Cookie.Value" />, and <see cref="P:System.Net.Cookie.Path" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default for the `path` parameter uses the empty string ("").
The `value` parameter for a <xref:System.Net.Cookie> must not be a `null` reference (Nothing in Visual Basic). The semicolon (";") and comma (",") characters are reserved and cannot be passed in the `value` parameter unless the string passed in the `value` parameter is enclosed in double quotes. So the following example constructor would succeed, but when you try to add this <xref:System.Net.Cookie> to a <xref:System.Net.CookieContainer> instance with the <xref:System.Net.CookieContainer.Add(System.Net.Cookie)> or <xref:System.Net.CookieContainer.Add(System.Uri,System.Net.Cookie)> methods, the operation will fail and throw an exception:
```csharp
System.Net.Cookie cookie = new System.Net.Cookie("contoso", "123,456", "");
cookie.Domain = "contoso.com";
new CookieContainer().Add(cookie);
```
However, the following constructor with these special characters escaped will create a <xref:System.Net.Cookie> that can be added to a <xref:System.Net.CookieContainer> instance:
```csharp
System.Net.Cookie cookie = new System.Net.Cookie("contoso", "\"123,456\"", "");
cookie.Domain = "contoso.com";
new CookieContainer().Add(cookie);
```
The comma character is used as a delimiter between separate cookies on the same line.
]]></format>
</remarks>
<exception cref="T:System.Net.CookieException">The <paramref name="name" /> parameter is <see langword="null" />.
-or-
The <paramref name="name" /> parameter is of zero length.
-or-
The <paramref name="name" /> parameter contains an invalid character.
-or-
The <paramref name="value" /> parameter is <see langword="null" /> .
-or -
The <paramref name="value" /> parameter contains a string not enclosed in quotes that contains an invalid character.</exception>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Cookie (string name, string value, string path, string domain);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string name, string value, string path, string domain) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.Cookie.#ctor(System.String,System.String,System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (name As String, value As String, path As String, domain As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Cookie(System::String ^ name, System::String ^ value, System::String ^ path, System::String ^ domain);" />
<MemberSignature Language="F#" Value="new System.Net.Cookie : string * string * string * string -&gt; System.Net.Cookie" Usage="new System.Net.Cookie (name, value, path, domain)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Parameters>
<Parameter Name="name" Type="System.String" Index="0" FrameworkAlternate="xamarinmac-3.0" />
<Parameter Name="value" Type="System.String" Index="1" FrameworkAlternate="xamarinmac-3.0" />
<Parameter Name="path" Type="System.String" Index="2" FrameworkAlternate="xamarinmac-3.0" />
<Parameter Name="domain" Type="System.String" Index="3" FrameworkAlternate="xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="name">The name of a <see cref="T:System.Net.Cookie" />. The following characters must not be used inside <paramref name="name" />: equal sign, semicolon, comma, newline (\n), return (\r), tab (\t), and space character. The dollar sign character ("$") cannot be the first character.</param>
<param name="value">The value of a <see cref="T:System.Net.Cookie" /> object. The following characters must not be used inside <paramref name="value" />: semicolon, comma.</param>
<param name="path">The subset of URIs on the origin server to which this <see cref="T:System.Net.Cookie" /> applies. The default value is "/".</param>
<param name="domain">The optional internet domain for which this <see cref="T:System.Net.Cookie" /> is valid. The default value is the host this <see cref="T:System.Net.Cookie" /> has been received from.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.Cookie" /> class with a specified <see cref="P:System.Net.Cookie.Name" />, <see cref="P:System.Net.Cookie.Value" />, <see cref="P:System.Net.Cookie.Path" />, and <see cref="P:System.Net.Cookie.Domain" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default for the `domain` and `path` parameters uses the empty string ("").
The `value` parameter for a <xref:System.Net.Cookie> must not be a `null` reference (Nothing in Visual Basic). The semicolon (";") and comma (",") characters are reserved and cannot be passed in the `value` parameter unless the string passed in the `value` parameter is enclosed in double quotes. So the following example constructor would succeed, but when you try to add this <xref:System.Net.Cookie> to a <xref:System.Net.CookieContainer> instance with the <xref:System.Net.CookieContainer.Add(System.Net.Cookie)> or <xref:System.Net.CookieContainer.Add(System.Uri,System.Net.Cookie)> methods, the operation will fail and throw an exception:
```csharp
System.Net.Cookie cookie = new System.Net.Cookie("contoso", "123,456", "", "contoso.com");
new CookieContainer().Add(cookie);
```
However, the following constructor with these special characters escaped will create a <xref:System.Net.Cookie> that can be added to a <xref:System.Net.CookieContainer> instance:
```csharp
System.Net.Cookie cookie = new System.Net.Cookie("contoso", "\"123,456\"", "", "contoso.com");
new CookieContainer().Add(cookie);
```
The comma character is used as a delimiter between separate cookies on the same line.
]]></format>
</remarks>
<exception cref="T:System.Net.CookieException">The <paramref name="name" /> parameter is <see langword="null" />.
-or-
The <paramref name="name" /> parameter is of zero length.
-or-
The <paramref name="name" /> parameter contains an invalid character.
-or-
The <paramref name="value" /> parameter is <see langword="null" /> .
-or -
The <paramref name="value" /> parameter contains a string not enclosed in quotes that contains an invalid character.</exception>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Comment">
<MemberSignature Language="C#" Value="public string Comment { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Comment" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Comment" />
<MemberSignature Language="VB.NET" Value="Public Property Comment As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Comment { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Comment : string with get, set" Usage="System.Net.Cookie.Comment" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a comment that the server can add to a <see cref="T:System.Net.Cookie" />.</summary>
<value>An optional comment to document intended usage for this <see cref="T:System.Net.Cookie" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The client can inspect this optional comment for information added by the server. For example, the server could include information about issues like the privacy policy or intended usage.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="CommentUri">
<MemberSignature Language="C#" Value="public Uri CommentUri { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri CommentUri" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.CommentUri" />
<MemberSignature Language="VB.NET" Value="Public Property CommentUri As Uri" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property Uri ^ CommentUri { Uri ^ get(); void set(Uri ^ value); };" />
<MemberSignature Language="F#" Value="member this.CommentUri : Uri with get, set" Usage="System.Net.Cookie.CommentUri" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a URI comment that the server can provide with a <see cref="T:System.Net.Cookie" />.</summary>
<value>An optional comment that represents the intended usage of the URI reference for this <see cref="T:System.Net.Cookie" />. The value must conform to URI format.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The URI can provide optional information, such as how the server uses the <xref:System.Net.Cookie>.
## Examples
The following example displays the properties of cookies that are returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Discard">
<MemberSignature Language="C#" Value="public bool Discard { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Discard" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Discard" />
<MemberSignature Language="VB.NET" Value="Public Property Discard As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool Discard { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Discard : bool with get, set" Usage="System.Net.Cookie.Discard" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the discard flag set by the server.</summary>
<value>
<see langword="true" /> if the client is to discard the <see cref="T:System.Net.Cookie" /> at the end of the current session; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When `true`, this property instructs the client application not to save the <xref:System.Net.Cookie> on the user's hard disk when a session ends.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Domain">
<MemberSignature Language="C#" Value="public string Domain { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Domain" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Domain" />
<MemberSignature Language="VB.NET" Value="Public Property Domain As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Domain { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Domain : string with get, set" Usage="System.Net.Cookie.Domain" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the URI for which the <see cref="T:System.Net.Cookie" /> is valid.</summary>
<value>The URI for which the <see cref="T:System.Net.Cookie" /> is valid.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A server cannot indicate a domain other than its own URI. However, it can indicate more than one server in the domain. The default value is the host that this cookie has been received from.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public override bool Equals (object comparand);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object comparand) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.Cookie.Equals(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Equals (comparand As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool Equals(System::Object ^ comparand);" />
<MemberSignature Language="F#" Value="override this.Equals : obj -&gt; bool" Usage="cookie.Equals comparand" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="comparand" Type="System.Object" Index="0" FrameworkAlternate="xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="comparand">A reference to a <see cref="T:System.Net.Cookie" />.</param>
<summary>Overrides the <see cref="M:System.Object.Equals(System.Object)" /> method.</summary>
<returns>Returns <see langword="true" /> if the <see cref="T:System.Net.Cookie" /> is equal to <paramref name="comparand" />. Two <see cref="T:System.Net.Cookie" /> instances are equal if their <see cref="P:System.Net.Cookie.Name" />, <see cref="P:System.Net.Cookie.Value" />, <see cref="P:System.Net.Cookie.Path" />, <see cref="P:System.Net.Cookie.Domain" />, and <see cref="P:System.Net.Cookie.Version" /> properties are equal. <see cref="P:System.Net.Cookie.Name" /> and <see cref="P:System.Net.Cookie.Domain" /> string comparisons are case-insensitive.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Expired">
<MemberSignature Language="C#" Value="public bool Expired { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Expired" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Expired" />
<MemberSignature Language="VB.NET" Value="Public Property Expired As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool Expired { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Expired : bool with get, set" Usage="System.Net.Cookie.Expired" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the current state of the <see cref="T:System.Net.Cookie" />.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Net.Cookie" /> has expired; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Expired cookies, if received, should be destroyed by the client application.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Expires">
<MemberSignature Language="C#" Value="public DateTime Expires { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.DateTime Expires" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Expires" />
<MemberSignature Language="VB.NET" Value="Public Property Expires As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property DateTime Expires { DateTime get(); void set(DateTime value); };" />
<MemberSignature Language="F#" Value="member this.Expires : DateTime with get, set" Usage="System.Net.Cookie.Expires" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the expiration date and time for the <see cref="T:System.Net.Cookie" /> as a <see cref="T:System.DateTime" />.</summary>
<value>The expiration date and time for the <see cref="T:System.Net.Cookie" /> as a <see cref="T:System.DateTime" /> instance.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Setting the <xref:System.Net.Cookie.Expires%2A> property to <xref:System.DateTime> makes this a session <xref:System.Net.Cookie>, which is its default value.
The <xref:System.DateTimeKind> property of <xref:System.Net.Cookie.Expires%2A> is used to determine if the <xref:System.Net.Cookie> is set in <xref:System.DateTimeKind> or <xref:System.DateTimeKind>. If the <xref:System.DateTimeKind> property is set to <xref:System.DateTimeKind>, then <xref:System.DateTimeKind> is assumed.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.Cookie.GetHashCode" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetHashCode () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetHashCode();" />
<MemberSignature Language="F#" Value="override this.GetHashCode : unit -&gt; int" Usage="cookie.GetHashCode " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Overrides the <see cref="M:System.Object.GetHashCode" /> method.</summary>
<returns>The 32-bit signed integer hash code for this instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Classes that might be used as a key in a hash table must provide this override, because objects that are used as keys in a hash table are required to generate their own hash code through this method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HttpOnly">
<MemberSignature Language="C#" Value="public bool HttpOnly { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool HttpOnly" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.HttpOnly" />
<MemberSignature Language="VB.NET" Value="Public Property HttpOnly As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool HttpOnly { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.HttpOnly : bool with get, set" Usage="System.Net.Cookie.HttpOnly" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Determines whether a page script or other active content can access this cookie.</summary>
<value>Boolean value that determines whether a page script or other active content can access this cookie.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When this property is set to `true`, a page script or other active content cannot access this cookie.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Name">
<MemberSignature Language="C#" Value="public string Name { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Name" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Name" />
<MemberSignature Language="VB.NET" Value="Public Property Name As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Name : string with get, set" Usage="System.Net.Cookie.Name" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name for the <see cref="T:System.Net.Cookie" />.</summary>
<value>The name for the <see cref="T:System.Net.Cookie" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.Cookie.Name%2A> property must be initialized before using an instance of the <xref:System.Net.Cookie> class.
The following characters are reserved and cannot be used for this attribute value: equal sign, semicolon, comma, new line (\n), return (\r), tab (\t), and space character. The dollar sign ($) character cannot be the first character.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<exception cref="T:System.Net.CookieException">The value specified for a set operation is <see langword="null" /> or the empty string
-or-
The value specified for a set operation contained an illegal character. The following characters must not be used inside the <see cref="P:System.Net.Cookie.Name" /> property: equal sign, semicolon, comma, newline (\n), return (\r), tab (\t), and space character. The dollar sign character ("$") cannot be the first character.</exception>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Path">
<MemberSignature Language="C#" Value="public string Path { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Path" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Path" />
<MemberSignature Language="VB.NET" Value="Public Property Path As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Path { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Path : string with get, set" Usage="System.Net.Cookie.Path" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the URIs to which the <see cref="T:System.Net.Cookie" /> applies.</summary>
<value>The URIs to which the <see cref="T:System.Net.Cookie" /> applies.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.Cookie.Path%2A> property specifies the subset of URIs on the origin server to which this <xref:System.Net.Cookie> applies. If this property is not specified, then this <xref:System.Net.Cookie> will be sent to all pages on the origin server or servers.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Port">
<MemberSignature Language="C#" Value="public string Port { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Port" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Port" />
<MemberSignature Language="VB.NET" Value="Public Property Port As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Port { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Port : string with get, set" Usage="System.Net.Cookie.Port" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a list of TCP ports that the <see cref="T:System.Net.Cookie" /> applies to.</summary>
<value>The list of TCP ports that the <see cref="T:System.Net.Cookie" /> applies to.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This attribute restricts the ports to which this <xref:System.Net.Cookie> may be sent. The default value means no restriction. Setting this to the empty string ("") will restrict the port to the one used in the HTTP response. Otherwise, the value must be a double-quoted string that contains port values delimited with commas.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<exception cref="T:System.Net.CookieException">The value specified for a set operation could not be parsed or is not enclosed in double quotes.</exception>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Secure">
<MemberSignature Language="C#" Value="public bool Secure { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Secure" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Secure" />
<MemberSignature Language="VB.NET" Value="Public Property Secure As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool Secure { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Secure : bool with get, set" Usage="System.Net.Cookie.Secure" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the security level of a <see cref="T:System.Net.Cookie" />.</summary>
<value>
<see langword="true" /> if the client is only to return the cookie in subsequent requests if those requests use Secure Hypertext Transfer Protocol (HTTPS); otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In effect, when this property is `true` this cookie may be sent only with https:// requests.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="TimeStamp">
<MemberSignature Language="C#" Value="public DateTime TimeStamp { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.DateTime TimeStamp" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.TimeStamp" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TimeStamp As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property DateTime TimeStamp { DateTime get(); };" />
<MemberSignature Language="F#" Value="member this.TimeStamp : DateTime" Usage="System.Net.Cookie.TimeStamp" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the time when the cookie was issued as a <see cref="T:System.DateTime" />.</summary>
<value>The time when the cookie was issued as a <see cref="T:System.DateTime" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This is a read-only property.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.Cookie.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::String ^ ToString();" />
<MemberSignature Language="F#" Value="override this.ToString : unit -&gt; string" Usage="cookie.ToString " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Overrides the <see cref="M:System.Object.ToString" /> method.</summary>
<returns>Returns a string representation of this <see cref="T:System.Net.Cookie" /> object that is suitable for including in a HTTP Cookie: request header.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The exact format of the string depends on the RFC that this cookie conforms to.
## Examples
The following example displays the string value of a cookie returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#4](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#4)]
[!code-csharp[NCLCookies#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#4)]
[!code-vb[NCLCookies#4](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#4)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Value">
<MemberSignature Language="C#" Value="public string Value { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Value" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Value" />
<MemberSignature Language="VB.NET" Value="Public Property Value As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Value { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Value : string with get, set" Usage="System.Net.Cookie.Value" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the <see cref="P:System.Net.Cookie.Value" /> for the <see cref="T:System.Net.Cookie" />.</summary>
<value>The <see cref="P:System.Net.Cookie.Value" /> for the <see cref="T:System.Net.Cookie" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.Cookie.Value%2A> of a <xref:System.Net.Cookie> must not be `null`. If a `null` value is assigned to this property, it's replaced with an empty string.
Semicolons and commas are reserved characters that cannot be used in the value of this property. Assigning invalid characters to this property doesn't throw an exception; but when you try to add this <xref:System.Net.Cookie> to a <xref:System.Net.CookieContainer> instance with the <xref:System.Net.CookieContainer.Add%2A> method, the operation will fail and throw an exception.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
<Member MemberName="Version">
<MemberSignature Language="C#" Value="public int Version { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Version" />
<MemberSignature Language="DocId" Value="P:System.Net.Cookie.Version" />
<MemberSignature Language="VB.NET" Value="Public Property Version As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Version { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.Version : int with get, set" Usage="System.Net.Cookie.Version" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>3.9.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the version of HTTP state maintenance to which the cookie conforms.</summary>
<value>The version of HTTP state maintenance to which the cookie conforms.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default value for the <xref:System.Net.Cookie.Version%2A> property is 0, complying with the original Netscape specification. If the value is explicitly set to 1, then this <xref:System.Net.Cookie> must conform to RFC 2109. Note that if a <xref:System.Net.Cookie> was created automatically by receiving a Set-Cookie2 HTTP response header, the conformance is set to RFC 2965.
An attempt to set the <xref:System.Net.Cookie.Version%2A> property to a value less than zero will throw an exception.
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the <xref:System.Net.Cookie> class topic.
[!code-cpp[NCLCookies#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#3)]
[!code-csharp[NCLCookies#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#3)]
[!code-vb[NCLCookies#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#3)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The value specified for a version is not allowed.</exception>
<altmember cref="T:System.Net.CookieCollection" />
<altmember cref="T:System.Net.CookieContainer" />
<altmember cref="T:System.Net.CookieException" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.