博客园  :: 首页  :: 新随笔  :: 联系 :: 管理

读取文本文件

Posted on 2011-05-20 10:50  codingsilence  阅读(155)  评论(0)    收藏  举报

string str = null;
using(StreamReader sr = new StreamReader("E/1.txt",System.Text.Encoding.UTF8))
{
  str = sr.ReadLine();
}