Guest User

Untitled

a guest
Jan 24th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Stream s;
  2. OpenFileDialog o = new OpenFileDialog();
  3. if (o.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  4. {
  5. if ((s = o.OpenFile()) != null)
  6. {
  7. string fn = o.FileName;
  8. string[] l = System.IO.File.ReadAllLines(fn);
  9. foreach (string li in l)
  10. {
  11. listBox1.Items.Add(l);
  12. }
  13. }
  14. }
  15. for (int m = 0; m < lb.Items.Count; m++)
  16. {
  17. lb.Items[m] = lb.Items[m].ToString()
  18. .Split(new[] { "","" }, StringSplitOptions.None)[0].TrimStart('"');
  19. }
Add Comment
Please, Sign In to add comment