c#写入文件流

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();

posted @ 2015-11-03 09:38  尘梦  阅读(791)  评论(0编辑  收藏  举报