/// <summary> /// 读取txt文件内容 /// </summary> /// <param name="Path">文件地址</param> public void ReadTxtContent(string Path) { StreamReader sr = new StreamReader(Path, Encoding.Default); string content; while ((content = sr.ReadLine()) != null) { Console.WriteLine(content.ToString()); } }