//文件流的方式存放文件 StreamWriter sw = new StreamWriter( path, false, Encoding.GetEncoding("gb2312")); sw.Write(sb.ToString());