title: Parse Multiline Text File into Multiple Variables
body: <p>I'm a little stuck on a particular problem.  I'm working in .NET and need to parse a multiline text file into multiple variables.  So far, I've got it reading the first line, as far as I know.  Here's what the text file looks like:</p>
  
  <pre><code>1/10/2014 1,2,3
  1 0 0
  1 1 0
  1 2 0
  1 3 0
  1 4 0
  1 5 0
  1 6 0
  1 7 0
  1 8 0
  </code></pre>
  
  <p>Here's what my code looks like for the first line - it's supposed to be pulling out the date (right now, it's not pulling out the date, it's assigning today) and the "1,2,3", then replacing the commas with spaces for "1 2 3".  For the rest, each number in each line should be its own variable, and that's where I'm stuck.  I only need to pick up the leading "1" for each subsequent line once as one variable (it will always be 0 or 1), and the second number in each is a tier number (those will always be 0-8), and the last numbers in each line, which are all "0" now, are all separate variables and will differ.  </p>
  
  <pre><code>string filePath = ConfigurationSettings.AppSettings["FileName.txt"];
  StreamReader reader = null;
  FileStream fs = null;
  fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
  reader = new StreamReader(fs);
  string line = null;
  line = reader.ReadLine();
  string[] lineInfo = line.Split(' ');
  string NumbersTemp = lineInfo[1];
  string numbers = NumbersTemp.Replace(","," ");
  string date = DateTime.Today.ToString("MM/dd/yyyy");
  </code></pre>
  
  <p>As you can see, I haven't gotten very far with the variables and I'm not even sure if this is going to work correctly the way I have it so far.  It's not erroring out, but it's not complete.  Any help getting these variables laid out would be much appreciated.</p>