title: Why is Enumerator.MoveNext not working as I expect it when used with using and async-await?
body: <p>I would like to enumerate through a <code>List&lt;int&gt;</code> and call a async method.  </p>
  
  <p>If I do this in this way:</p>
  
  <pre><code>public async Task NotWorking() {
    var list = new List&lt;int&gt; {1, 2, 3};
  
    using (var enumerator = list.GetEnumerator()) {
      Trace.WriteLine(enumerator.MoveNext());
      Trace.WriteLine(enumerator.Current);
  
      await Task.Delay(100);
    }
  }
  </code></pre>
  
  <p>the result is:</p>
  
  <pre><code>True
  0
  </code></pre>
  
  <p>but I expect it to be:</p>
  
  <pre><code>True
  1
  </code></pre>
  
  <p>If i remove the <code>using</code> or the <code>await Task.Delay(100)</code>:</p>
  
  <pre><code>public void Working1() {
    var list = new List&lt;int&gt; {1, 2, 3};
  
    using (var enumerator = list.GetEnumerator()) {
      Trace.WriteLine(enumerator.MoveNext());
      Trace.WriteLine(enumerator.Current);
    }
  }
  
  public async Task Working2() {
    var list = new List&lt;int&gt; {1, 2, 3};
  
    var enumerator = list.GetEnumerator();
    Trace.WriteLine(enumerator.MoveNext());
    Trace.WriteLine(enumerator.Current);
  
    await Task.Delay(100);
  }
  </code></pre>
  
  <p>the output is as expected:</p>
  
  <pre><code>True
  1
  </code></pre>
  
  <p>Can anyone explain that behavior to me?</p>