C#怎么用FileStream一行一行的读取文本

如题所述

FileStream fs = new FileStream("d:\\1.txt", FileMode.Open, FileAccess.Read);
StreamReader sr =new StreamReader(fs);
string s;
while ((s=sr.ReadLine()) != null)
  {
      MSGBox.Text += s+"\n";
  }
温馨提示:答案为网友推荐,仅供参考
相似回答