Export (0) Print
Expand All

Cookie.Version Property

Gets or sets a single digit that indicates the version of HTTP state maintenance to which the cookie conforms.

Namespace:  System.Net
Assembly:  System.Net (in System.Net.dll)

public int Version { get; set; }

Property Value

Type: System.Int32
A single digit that indicates the version of HTTP state maintenance to which the cookie conforms. The default is 0.

ExceptionCondition
ArgumentOutOfRangeException

The specified value is less than zero.

If the value is explicitly set to 1, then this Cookie must conform to RFC 2109. If a Cookie is created automatically by receiving a Set-Cookie2 HTTP response header, the conformance is set to RFC 2965.

An attempt to set the Version property to a value less than zero will throw an exception.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft