日期:2014-05-16 浏览次数:20972 次
System.IO.File.WriteAllText("file.txt", textBox1.Text);
string k;
saveFileDialog1.ShowDialog();
System.IO.StreamWriter objfil = new System.IO.StreamWriter(@saveFileDialog1.FileName);
for (int i = 0; i < 200; i++)
{
k = arr[i]+ "\r\n";
objfil.Write(k);
}
objfil.Close();
objfil.Dispose();
List<string> input = new List<string>();
string s = "";
do
{
s = Console.ReadLine();
input.Add(s);
} while (s != "");
System.IO.File.WriteAllLines("C:\\1.txt", input.ToArray());