Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Stream s;
- OpenFileDialog o = new OpenFileDialog();
- if (o.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- if ((s = o.OpenFile()) != null)
- {
- string fn = o.FileName;
- string[] l = System.IO.File.ReadAllLines(fn);
- foreach (string li in l)
- {
- listBox1.Items.Add(l);
- }
- }
- }
- for (int m = 0; m < lb.Items.Count; m++)
- {
- lb.Items[m] = lb.Items[m].ToString()
- .Split(new[] { "","" }, StringSplitOptions.None)[0].TrimStart('"');
- }
Add Comment
Please, Sign In to add comment