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();
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();