Cookie.ToString 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會覆寫這個 ToString() 方法。
public:
override System::String ^ ToString();
public override string ToString();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
傳回
回傳一個 Cookie 適合包含於 HTTP Cookie: 請求標頭中的字串表示。
範例
以下範例顯示回應中回傳的 cookie 字串值。 完整範例請參見 Cookie 課程主題。
// Show the string representation of the cookie.
Console.WriteLine($"String: {cook}");
' Show the string representation of the cookie.
Console.WriteLine($"String: {cook}")
備註
字串的確切格式取決於該 cookie 所遵循的 RFC。