title: C# float.ToString Rounding Values
body: <p>Maybe I am missing something but the <code>float.ToString()</code> method rounds numbers, which causes me a lot of headache.<p>
  Take a look at the following small code:
  When entering 12345678 as input, the float number in the debugger is correct but the output of the <code>ToString</code> methods is 12345680 (in any format I've tried...)</p>
  
  <pre><code>Console.WriteLine("Please enter a float number");
  float theFloat = float.Parse(Console.ReadLine());
  Console.WriteLine(string.Format("You have entered {0}", theFloat.ToString("F")));
  </code></pre>
  
  <p>And the output:</p>
  
  <pre><code>Please enter a float number
  12345678
  You have entered 12345680.00
  </code></pre>
  
  <p>Help will be much appreciated!</p>