FileStream file = new FileStream("user.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);
StreamReader sd = new StreamReader(file);
string str = sd.ReadToEnd();
str = str.Replace("Application=true", "Application=false");
sd.Close();
file.Close();
FileStream fs = File.Create("user.txt");
StreamWriter sw = new StreamWriter(fs);
sw.Write(str);
sw.Flush();
sw.Close();
fs.Close();
StreamReader sd = new StreamReader(file);
string str = sd.ReadToEnd();
str = str.Replace("Application=true", "Application=false");
sd.Close();
file.Close();
FileStream fs = File.Create("user.txt");
StreamWriter sw = new StreamWriter(fs);
sw.Write(str);
sw.Flush();
sw.Close();
fs.Close();