此代码的输出
string fileDateTime = "StepsGA-" + DateTime.Now.ToString("dd-MM-yyyy-HH-mm-ss") + ".txt";
string fname = System.IO.Path.Combine(System.Environment.CurrentDirectory, fileDateTime);
File.WriteAllText(fname, txtSteps.Text);不保留应有的换行符。文本框中的所有内容都打印在水平的长行中!我哪里错了?谢谢!
发布于 2013-01-02 16:40:23
找到答案了!我需要使用Environment.NewLine而不是\n。
https://stackoverflow.com/questions/14118626
复制相似问题