C#获取txt记事本内容,防止乱码情况

 StreamReader sr = new StreamReader(@"E:\人名.txt", Encoding.GetEncoding("GB2312"));
            string readText = sr.ReadToEnd();

 

posted @ 2014-10-29 14:06  X.Y  阅读(327)  评论(0编辑  收藏  举报