次の方法で共有


HttpCookie コンストラクタ (String)

新しい cookie を作成し、名前を付けます。

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)

構文

'宣言
Public Sub New ( _
    name As String _
)
'使用
Dim name As String

Dim instance As New HttpCookie(name)
public HttpCookie (
    string name
)
public:
HttpCookie (
    String^ name
)
public HttpCookie (
    String name
)
public function HttpCookie (
    name : String
)
適用できません。

パラメータ

  • name
    新しい cookie の名前。

使用例

新しい Cookie を作成して名前を付けるコード例を次に示します。

Dim MyCookie As New HttpCookie("LastVisit")
    
HttpCookie MyCookie = new HttpCookie("LastVisit");
    
HttpCookie myCookie = new HttpCookie("LastVisit");
var myCookie : HttpCookie = new HttpCookie("LastVisit")
    

プラットフォーム

Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition

Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。

バージョン情報

.NET Framework

サポート対象 : 3.0,2.0,1.1,1.0

参照

関連項目

HttpCookie クラス
HttpCookie メンバ
System.Web 名前空間