C#一次性写入全部文件到文件
using System; namespace PlayingAround { class ReadAll { public static void Main(string[] args) { string myText = "Line1" + Environment.NewLine + "Line2" + Environment.NewLine; System.IO.File.WriteAllText(@"C:\t2", myText); } } }
C#一次性写入全部文件到文件
using System; namespace PlayingAround { class ReadAll { public static void Main(string[] args) { string myText = "Line1" + Environment.NewLine + "Line2" + Environment.NewLine; System.IO.File.WriteAllText(@"C:\t2", myText); } } }