title: When does IEnumerable.GetEnumerator get called instead of IEnumerable<T>.GetEnumerator?
body: <p>Looking at this code : </p>
  
  <pre><code>public class myWords : IEnumerable&lt;string&gt;
  {
      string[] f = "I love you".Split(new string[]{"lo"},StringSplitOptions.RemoveEmptyEntries);
  
      public IEnumerator&lt;string&gt; GetEnumerator()
      {
          return f.Select(s =&gt; s + "2").GetEnumerator();
      }
  
      IEnumerator IEnumerable.GetEnumerator()
      {
          return f.Select(s =&gt; s + "3").GetEnumerator();
      }
  }
  </code></pre>
  
  <p>Running : </p>
  
  <pre><code> myWords m = new myWords();
   foreach (var s in m)
   {
       Console.WriteLine(s);
   }
  </code></pre>
  
  <p>Yields</p>
  
  <pre><code>I 2
  ve you2    // notice "2", so the generic Ienumerator has executed.
  </code></pre>
  
  <p>I   understand that the  non-generic <code>IEnumerator</code> version is for  compatibility.</p>
  
  <p><strong>Question:</strong></p>
  
  <ol>
  <li>In what scenario will the non-generic be invoked? </li>
  <li>How can I <em>force</em> my code to be run with the non-generic <code>IEnumerator</code>?</li>
  </ol>