title: C# - For-loop internals
body: <p>a quick, simple question from me about for-loops.</p>
  
  <p><strong>Situation</strong>
  I'm currently writing some high-performance code when I suddenly was wondering how the for-loop actually behaves. I know I've stumbled across this before, but can't for the life of me find this info again :/</p>
  
  <p>Still, my main concern was with the limiter. Say we have:</p>
  
  <pre><code>for(int i = 0; i &lt; something.awesome; i++)
  {
  // Do cool stuff
  }
  </code></pre>
  
  <p><strong>Question</strong>
  Is something.awesome stored as an internal variable or is the loop constantly retrieving something.awesome to do the logic-check? Why I'm asking is of course because I need to loop through a lot of indexed stuff and I really don't want the extra function-call overhead for each pass.</p>
  
  <p>However if something.awesome is only called once, then I'm going back under my happy rock! :)</p>