Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Arizona:Phoenix
- Arkansas:Little
- Rock California:Sacramento
- List<string> lstResult = new List<string>();
- using (StreamReader sr = new StreamReader(@"C:Stackfile.txt"))
- {
- //string test = sr.ReadLine();
- string line = string.Empty;
- while ((line = sr.ReadLine()) != null)
- {
- lstResult.Add(line.Split(':').Select(x=>x).Skip(1).SingleOrDefault().ToString());
- }
- }
- comboBox1.DataSource = lstResult;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement