用如下方式写一文件:
StreamWriter sw;
sw=File.CreateText("c:\temp.txt");
sw.WriteLine("中华人民共和国");
如何使所写的temp.txt文件的编码方式为GB2312(默认为UTF-8)?????????
StreamWriter sw;
sw=File.CreateText("c:\temp.txt");
sw.WriteLine("中华人民共和国");
如何使所写的temp.txt文件的编码方式为GB2312(默认为UTF-8)?????????
sw.WriteLine("中华人民共和国");