streamreader

using (StreamReader sr = new StreamReader(@"C:\Documents and Settings\Administrator\桌面\1.txt",Encoding.Default))
        //    {
        //        string a=sr.ReadLine();
        //        Console.Write(a);
        //    }
            using (StreamWriter sr = new StreamWriter(@"C:\Documents and Settings\Administrator\桌面\1.txt",true,Encoding.Default))
            {
                string s="我是个一个神";
              
                sr.Write(s);
               
            }
            Console.ReadKey();

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