//1.打开资源管理器 OpenFileDialog open = new OpenFileDialog(); if (open.ShowDialog() == DialogResult.OK) { textBox1.Text =open.FileName; } //传入txt文件路径参数 读取txt文件所有内容 返回DATATABLE public DataTable GetTxt(string pths) { StreamReader sr = new S
public static List<PostPerson> GetNameByFile() { #region 读取txt文件 var file = File.Open(Environment.CurrentDirectory + "\\aaa.txt", FileMode.Open); List<string> txt = new List<string>(); using (var stream = new StreamReader(file,