IEnumerable_Interface_Explained
 
The IEnumerable interface of  System.Collections namespace and contains only a single method definition. The interface definition looks like this:

public interface IEnumerable
{
IEnumerator GetEnumerator();
}


The GetEnumerator method must return an instance of an object of a class which implements the IEnumerator interface.

The generic and type-safe version called IEnumerable<T> of System.Collections.Generic implements the IEnumerator<T> GetEnumerator() interface.

public interface IEnumerable<out T> : IEnumerable
{
IEnumerator<T> GetEnumerator();
}