title: How yield return is interpreted by foreach loop ?
body: <p>How <code>yield return</code> is interpreted by <code>foreach</code> loop ? </p>
  
  <p><code>foreach</code> loop looks something like this:</p>
  
  <pre><code>var tmp = obj.GetEnumerator();
  int i; // up to C# 4.0
  while(tmp.MoveNext()) {
      int i; // C# 5.0
      i = tmp.Current;
      {...} // your code
  }
  </code></pre>
  
  <p>As far as I understood, compiler must somehow substitute <code>yield return</code> with <code>MoveNext()</code> &amp; <code>Current</code>(property) from IEnumerable/IEnumerable interface.</p>