private void btnLoad_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); string path = ""; ofd.FileName = ""; ofd.ShowDialog(); path = ofd.FileName; string[] sp; if (string.IsNullOrEmpty(ofd.FileName)) return; string[] lines= File.ReadAllLines(path); for (int i = 0; i < lines.Length; i++) { sp = lines[i].Split(','); listBox1.Items.Add(sp[0]); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)