Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void ReadFile(string _file)
- {
- List<string> lines = new List<string>();
- using (StreamReader r = new StreamReader(_file))
- {
- string line;
- while ((line = r.ReadLine()) != null)
- {
- lines.Add(line);
- }
- }
- foreach (string s in lines)
- {
- listBox1.Items.Add(s);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment