Implementing IEnumerable
essentially means that the object can be iterated over. This doesn't necessarily mean it is an array as there are certain lists that can't be indexed but you can enumerate them.
IEnumerator
is the actual object used to perform the iterations. It controls moving from one object to the next in the list.
Most of the time, IEnumerable
& IEnumerator
are used transparently as part of a foreach
loop.