Microscopic Traffic Simulator

- Main Page
- Packages
- Classes
- Files

- File List

FileLineDataLoader.cs
Go to the documentation of this file.
1 using System.Collections.Generic;
2 using System.IO;
3
4 namespace Microscopic_Traffic_Simulator___Model.Utilities
5 {
9 class FileLineDataLoader
10 {
14 private string path;
15
20 internal FileLineDataLoader(string path)
21 {
22 this.path = path;
23 }
24
29 internal IEnumerable<string[]> GetLinesWithData()
30 {
31 using (StreamReader sr = new StreamReader(path))
32 {
33 string line;
34 while (!string.IsNullOrEmpty(line = sr.ReadLine()))
35 {
36 yield return line.Split();
37 }
38 }
39 }
40 }
41 }
System
Microscopic_Traffic_Simulator___Model.Utilities.FileLineDataLoader
Class for loading lines of data from text file.
Definition: FileLineDataLoader.cs:9
Microscopic_Traffic_Simulator___Model