StreamWriter sw = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + "test.txt", false, Encoding.Default); sw.WriteLine("test");