Cookie.ToString Method ()

 

Overrides the Object.ToString method.

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

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())

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: