title: Why does IEnumerator<T> inherit from IDisposable while the non-generic IEnumerator does not?
body: <p>I noticed that the generic <code>IEnumerator&lt;T&gt;</code> inherits from IDisposable, but the non-generic interface IEnumerator does not. Why is it designed in this way?</p>
  
  <p>Usually, we use foreach statement to go through a <code>IEnumerator&lt;T&gt;</code> instance. The generated code of foreach actually has try-finally block that invokes Dispose() in finally. </p>