Cookie::ToString Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Overrides the Object::ToString method.

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

public:
virtual String^ ToString() override

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

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: