private void Write(string filename, string s) { Console.WriteLine(s); StreamWriter sw = new StreamWriter("C:\\" + filename, false); sw.WriteLine(s); sw.Close(); }