c# 清除当前用户所有cookies

try
   {
        foreach (string strFileName in Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Cookies)))
       {
           if (strFileName.ToLower().IndexOf("index.dat")==-1)
          {
                File.Delete(strFileName);
           }
        }

   }
   catch(Exception ex)
   {

   }

你可能感兴趣的:(Cookies)