Microscopic Traffic Simulator
FileLineDataLoader.cs
Go to the documentation of this file.
1 using System.Collections.Generic;
2 using System.IO;
3 
5 {
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 }
Class for loading lines of data from text file.