C# 读取txt文件内容

if (!System.IO.File.Exists(@"E:\111.txt"))
{
   Console.Write("没有找到文件!");
}
System.IO.StreamReader sr = new System.IO.StreamReader(@"E:\111.txt");
OutUrl = sr.ReadToEnd();
sr.Close();

  

原文地址:https://www.cnblogs.com/XuPengLB/p/6728168.html