Exemplo n.º 1
0
        private void SaveCookie()
        {
            cookieobj cookie     = new cookieobj(ConnectionClass.ClientTCP.Cookie);
            string    cookiesave = JsonConvert.SerializeObject(cookie);

            System.IO.StreamWriter writer = new System.IO.StreamWriter(@"cookie.json", false);
            writer.Write(cookiesave);
            writer.Close();
        }
Exemplo n.º 2
0
        private void RemoveCookie()
        {
            cookieobj cookie     = new cookieobj("");
            string    cookiesave = JsonConvert.SerializeObject(cookie);

            Console.WriteLine(cookiesave);
            System.IO.StreamWriter writer = new System.IO.StreamWriter(@"cookie.json", false);
            writer.Write(cookiesave);
            writer.Close();
        }