Why must IEnumerator<T> GetEnumerator() and GetEnumerator() be implemented?

Viewed 457

Working on implementing the IEnumerable interface. I actually found two methods that need to be implemented:

public IEnumerator<Item> GetEnumerator()
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()

Not sure why I need to implement these two methods (which look quite similar). Could anyone explain it to me?

2 Answers
Related