日期:2014-05-17 浏览次数:20546 次
write = new StreamWriter(file.FullName, false);
------解决方案--------------------
/// <param name="FilePath">文件路径</param> /// <param name="Content">文件内容</param> /// <param name="Append">是否追加</param> /// <param name="Encode">文件编码</param> public static void WriteFile(string FilePath, string Content, bool Append) { StreamWriter st = new StreamWriter(FilePath, Append, System.Text.Encoding.GetEncoding("gb2312")); st.Write(Content); st.Close(); st.Dispose(); }