dotnetcurry.com

Implement a method returning an IEnumerable (Iterators in C#)

Although the IEnumerable interface contains only a single method, that method returns an implementation of the IEnumerator interface. This means that both the IEnumerable and the IEnumerator interfaces will need to be developed at the same time. A majority of development effort will need to be put in the latter. The class implementing the IEnumerator interface is often closely coupled to the...