title: Why double.MaxValue output has different maximum length with double max = 1.79769313486232E307;
body: <p>I tried the following code to get maximum value of double (64-bit double-precision):</p>
  
  <pre><code>    public void double_max_value() {
          double max_value = double.MaxValue;
          Console.WriteLine(max_value.ToString());
      }
  </code></pre>
  
  <p>The results was:
  <a href="https://i.stack.imgur.com/WO5kv.png" rel="nofollow noreferrer">console output of double.MaxValue</a></p>
  
  <p>Then i tried to declare a variable:</p>
  
  <pre><code>double var_double = 1.79769313486232E+308;
  </code></pre>
  
  <p>I got an error: 
  Floating-point constant is outside the range of type 'double'.</p>
  
  <p>It will work when i declare: </p>
  
  <pre><code>double var_double = 1.79769313486232E+307;
  </code></pre>
  
  <p>I'm using VS community 2015.
  .NET framework version 4.7.03056.</p>
  
  <p>Why do i got an error?since double.MaxValue output is 1.79769313486232E+308.
  Thank you.</p>