Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Arizona:Phoenix
  2. Arkansas:Little
  3. Rock California:Sacramento
  4.  
  5. List<string> lstResult = new List<string>();
  6. using (StreamReader sr = new StreamReader(@"C:Stackfile.txt"))
  7. {
  8. //string test = sr.ReadLine();
  9. string line = string.Empty;
  10. while ((line = sr.ReadLine()) != null)
  11. {
  12. lstResult.Add(line.Split(':').Select(x=>x).Skip(1).SingleOrDefault().ToString());
  13. }
  14. }
  15.  
  16. comboBox1.DataSource = lstResult;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement