string newcity = txtCity.Text; int newfigure = int.Parse(txtSalefigure.Text); string filename = txtFileName.Text; StreamWriter file = null; if (File.Exists("C:/"+filename+".txt") == false) { file = new StreamWriter("C:/"+filename+".txt", true); } else { file = new StreamWriter("C:/"+filename+".txt"); } file.WriteLine(newcity +" "+newfigure+ "\n"); file.Flush(); file.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)