Implement
IEnumerator<T>
normally, and
IEnumerator
explicitly. Then have the
IEnumerator
version return the
IEnumerator<T>.Current
.
[Edit]
--------
Btw to get the MSDN code to compile, add dummy classes for
Box
and
BoxCollection
:
class Box { }
class BoxCollection : Collection<Box> { }