Export (0) Print
Expand All

Cookie.ToString Method

Overrides the Object.ToString method.

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

'Declaration
Public Overrides Function ToString As String

Return Value

Type: System.String
Returns a string representation of this Cookie object that is suitable for including in a HTTP Cookie: request header.

The exact format of the string depends on the RFC that this cookie conforms to.

The following example displays the string value of a cookie returned in a response. For the complete example, see the Cookie class topic.

' Show the string representation of the cookie.
Console.WriteLine("String: {0}", cook.ToString())

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft