日期:2014-05-18 浏览次数:20820 次
String xx = "要写的内容" ; String filePath = @"D:\xx.txt"; if (System.IO.File.Exists(filePath)) System.IO.File.WriteAllText(filePath, xx + Environment.NewLine + System.IO.File.ReadAllText(filePath, Encoding.GetEncoding("GB2312")), Encoding.GetEncoding("GB2312")); else System.IO.File.WriteAllText(filePath, xx, Encoding.GetEncoding("GB2312"));