Yield/iterator corner cases
<p>On this article ( <a href="http://blogs.msdn.com/oldnewthing/archive/2008/08/13/8854601.aspx" rel="nofollow">http://blogs.msdn.com/oldnewthing/archive/2008/08/13/8854601.aspx</a>), there is a pop question about iterators and one concerning a corner case:</p>

<blockquote>
  <p>Exercise: Consider the following
  fragment:   foreach (int i in
  CountTo100Twice()) {   ...  }</p>
  
  <p>Explain what happens on the 150th call
  to MoveNext() in the above loop.
  Discuss its consequences for recursive
  enumerators (such as tree traversal).</p>
</blockquote>

<p>I haven't run this code, but I am assuming that this is a question supposedly with an answer from the articles (all links provided below), but I can't find the answer in the knowledge shared by the article or in the comments for this particular article.</p>

<p>Does anyone know what the answer is? What other corner cases are there?</p>

<p>1) <a href="http://blogs.msdn.com/oldnewthing/archive/2008/08/12/8849519.aspx" rel="nofollow">http://blogs.msdn.com/oldnewthing/archive/2008/08/12/8849519.aspx</a></p>

<p>2) <a href="http://blogs.msdn.com/oldnewthing/archive/2008/08/13/8854601.aspx" rel="nofollow">http://blogs.msdn.com/oldnewthing/archive/2008/08/13/8854601.aspx</a></p>

<p>3) <a href="http://blogs.msdn.com/oldnewthing/archive/2008/08/14/8862242.aspx" rel="nofollow">http://blogs.msdn.com/oldnewthing/archive/2008/08/14/8862242.aspx</a></p>

<p>4) <a href="http://blogs.msdn.com/oldnewthing/archive/2008/08/15/8868267.aspx" rel="nofollow">http://blogs.msdn.com/oldnewthing/archive/2008/08/15/8868267.aspx</a></p>

<p>Thanks</p>
