Bagikan melalui


Cookie.ToString Metode

Definisi

Mengambil alih ToString() metode .

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Mengembalikan

Mengembalikan representasi string dari objek ini Cookie yang cocok untuk menyertakan dalam Http Cookie: header permintaan.

Contoh

Contoh berikut menampilkan nilai string cookie yang dikembalikan dalam respons. Untuk contoh lengkapnya, lihat Cookie topik kelas.

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

Keterangan

Format string yang tepat tergantung pada RFC yang sesuai dengan cookie ini.

Berlaku untuk