private void C_txt(string str) { string strname = "D:\\" + System.DateTime.Now.ToString("yyyymmddhhmmss") + ".txt"; StreamWriter swWordChange = new StreamWriter(strname, false, Encoding.GetEncoding("gb2312")); swWordChange.Write(str); swWordChange.Close(); }
原文:http://www.cnblogs.com/zhushang/p/3731954.html