title: c# get iterator position in dictionary
body: <p>I have a <code>Dictionary&lt;string,string&gt;</code> and I iterate over its KeyValuePairs. But my issue is that I need to stop the iteration at some point and continue the iteration from the same position. My code is as follows.</p>
  
  <pre><code>for(i = 0; i&lt;5; i++)
  {
      foreach(var pair in dictionary) /* continue from iterators last position */
      {
            /* do something */
            if(consdition) break;
       }
   }
  </code></pre>
  
  <p>The code is not very clear but I hope my what I'm trying to do is. What do I do?  </p>