title: StreamReader ReadLine function
body: <p>I'm using a StreamReader object's ReadLine function to read decimal values from a text file.  What I find odd is some values have three decimal places of all zeroes, i.e "-93.000", but when I'm debugging, I notice the stream reader will only read the previous value as "-93.00".  I'm not sure why this happens, it will read values with two decimal places of all zeroes, i.e. "-85.00", just fine.  I need to be able to read the entire value for validation purposes, otherwise inaccurate results are reported in my program.</p>
  
  <p>Any ideas why this behavior occurs?  Is there some other way of parsing the text file that will preserve the original string??  Thanks.</p>
  
  <p>UPDATE:</p>
  
  <p>Code that reads text file</p>
  
  <pre><code>string Line = sr.ReadLine();
  </code></pre>
  
  <p>Sample values, in the text file:</p>
  
  <pre><code>-93.000 {\Tab}
  -99.99 {\Tab}
  -85.00
  </code></pre>
  
  <p>Line variable after reading first line:</p>
  
  <pre><code>Line = "-93.00\t
  -99.99\t
  -85.00"
  </code></pre>
  
  <p>UPDATE 2:</p>
  
  <p>I've stepped through this several times in the last hour.  I've tried to observant of where the Line is being set, this is what I've narrowed it down to.  I'll comb through the code again just to be sure.  I'll also look at the formatting of the text file as it was provided to me by an external source.</p>
  
  <p>UPDATE 3:</p>
  
  <p>Per John Saunders' suggestion, I tried it with the just the culprit value and lo and behold it provided the value as originally presented.  I'm guessing that it may have something to do with the way the original text file is formatted, maybe some hidden characters that are somehow affecting how the value is being read.  I know this is an unusual case. </p>
  
  <p>UPDATE 4:</p>
  
  <p>Tried modifying the text file in Notepad++, removed some spaces and resaved.  The stream reader now reads it fine.  This was a very strange issue and I do agree with everyone else that ReadLine() shouldn't have done this.  Perhaps it was also just a fluke with my settings or with the text file encoding.</p>