title: C# Why do I only get partial results when parsing out a CSV or TSV file?
body: <p>I am trying to get the second value from a CSV file with 100 rows.  I am getting the first 42 values then it stops... no error messege, or error handling at all for that matter.  I am perplexed and am on a timeline.  It is also doing it for a TSV file, but giving the first 43 results.  Please help and let me know if it looks strange to you.</p>
  
  <p>I am using streamreader, reading each line into a string array, splitting the array and taking the second value and adding it to a list...</p>
  
  <pre><code>        string path = @"C:\Users\dave\Desktop\codes\testfile.txt";
          StreamReader sr = new StreamReader(path);
          List&lt;string&gt; stkno = new List&lt;string&gt;();
  
          foreach (var line in path)
          {
              string s = sr.ReadLine();
              string[] words = s.Split(',');
              stkno.Add(words[1]);
          }
          var message = string.Join(",", stkno.ToArray());
          MessageBox.Show(message);
  </code></pre>