码迷,mamicode.com
首页 > Windows程序 > 详细

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

时间:2014-10-29 14:46:17      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   sp   div   log   bs   ad   new   

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

 

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

标签:style   blog   color   sp   div   log   bs   ad   new   

原文地址:http://www.cnblogs.com/blog4xy/p/4059363.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!