title: Why does a float variable stop incrementing at 16777216 in C#?
body: <pre><code>float a = 0;
  while (true)
  {
      a++;
      if (a &gt; 16777216)
          break; // Will never break... a stops at 16777216
  }
  </code></pre>
  
  <p>Can anyone explain this to me why a float value stops incrementing at 16777216 in this code?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Or even more simple:</p>
  
  <pre><code>float a = 16777217; // a becomes 16777216
  </code></pre>