Junior OOP

What is the difference between IEnumerable and IEnumerator?

  • IEnumerable → Provides collection traversal capability (GetEnumerator()

method).

  • IEnumerator → Used to iterate over a collection (MoveNext(), Current,

Reset()).

More from C# Programming Tutorial

All questions for this course