Type Summary

						public interface IEnumerator
{
  // Properties
     object Current { get; }

  // Methods
     bool MoveNext ();
     void Reset ();
}

BA During the design of the BCL we debated long and hard about including the Reset method on this interface. On one side, we knew of several kinds of enumerators for which implementing Reset would be impractical. On the other side, we felt it was very important to provide some compatibility with COM's IEnum interface. So we compromised and included Reset, but took the unusual step of allowing implementers to throw a NotSupportedException if implementing Reset is not appropriate. Usually, having to throw a NotSupportedException from an interface implementation either means that the interface is not well designed, or ...

Get .NET Framework Standard Library Annotated Reference, Volume 1: Base Class Library and Extended Numerics Library now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.