Example #1
0
        static void Main(string[] args)
        {
            var cookie = new HttpCookie();

            // name is the dicionary key, James is 
            // the dictionary value.
            cookie["name"] = "James";

            Console.WriteLine(cookie["name"]);

            Console.ReadLine();
        }
Example #2
0
 static void Main(string[] args)
 {
     var cookie = new HttpCookie();
     cookie["name"] = "Simon";
     Console.WriteLine(cookie["name"]);
 }
 static void Main(string[] args)
 {
     var cookie = new HttpCookie();
     cookie["name"] = "FooBar";
     Console.WriteLine(cookie["name"] + " - Cookie expires on {0}.", cookie.Expiry);
 }