using (FileStream wir=new FileStream(@"C:\Documents and Settings\Administrator\桌面\1.txt",FileMode.OpenOrCreate,FileAccess.Write))
{
string a = " 所得税速度是是";
byte[] b = Encoding.GetEncoding("gb2312").GetBytes(a);
wir.Write(b, 0, b.Length);
}
Console.ReadKey();
转载于:https://www.cnblogs.com/mengluo/p/4932198.html