title: Loop from 0x0000 to 0xFFFF
body: <p>I'd like a loop that uses a UInt16 (ushort) to loop through all of its values.  However, this doesn't do it:</p>
  
  <pre><code>for( ushort i = 0; i &lt; UInt16.MaxValue; i++ )
  {
      // do something
  }
  </code></pre>
  
  <p>The problem is that the loop will quit when i == 0xFFFF and not "do something".
  If I change the 'for' statement to "for(ushort i = 0; i &lt;= UInt16.MaxValue; i++ )", then it becomes an infinite loop because i never gets to 0x10000 because ushorts only go to 0xFFFF.</p>
  
  <p>I could make 'i' an int and cast it or assign it to a ushort variable in the loop.</p>
  
  <p>Any suggestions?</p>