HttpCookie.Name 屬性

定義

取得代表 HttpCookie 名稱的權杖。

public:
 property Platform::String ^ Name { Platform::String ^ get(); };
winrt::hstring Name();
public string Name { get; }
var string = httpCookie.name;
Public ReadOnly Property Name As String

屬性值

String

Platform::String

winrt::hstring

表示 HttpCookie 名稱的權杖。

備註

當建構函式初始化 HttpCookie 時,必須設定 Name 屬性。

在 Visual Basic) 中, HttpCookie 的名稱不能為 Null (Nothing

屬性應該是 RFC 2616RFC 6265中所定義的權杖。

下列字元會當做分隔符號使用,而且不能用在 Cookie 名稱中:

  • 左剖析 (' (')
  • right paren (') ')
  • 大於 (' > )
  • 小於 (' < )
  • at sign ('@')
  • 逗號 (',')
  • 分號 (';')
  • 冒號 (':')
  • 反斜線 ('\')
  • 雙引號 ('「')
  • 正斜線 ('/')
  • 左方括弧 ('[')
  • 右方括弧 (']')
  • 問號 ('?')
  • 等號 ('=')
  • 左波浪括弧 ('{')
  • 右波浪括弧 ('}')
  • 新行 ('\n')
  • return ('\r「)
  • space (' ')
  • tab ('\t「)

適用於