/// <summary> /// 读取txt文件内容 /// </summary> /// <param name="Path">文件路径</param> /// <returns></returns> public string ReadTxtContent(string Path) { StringBuilder sb = new StringBuilder(); StreamReader sr = new StreamReader(Path, Encoding.Default); string content; while ((content = sr.ReadLine()) != null) { sb.Append(content.ToString()); } return sb.ToString(); }