C# Corner


About IEnumerable

IEnumerable is the base interface for all non generic collections that can be enumerated by implemented interface System.Collections.Generic.IEnumerable<T>. IEnumerable contains a single method called GetEnumerator() which returns an IEnumerator and also provides the ability to iterate through the collection by exposing a Current property and MoveNext and Reset methods. IEnumerable functionality using the foreach syntax however implementing IEnumerable is not required. When using Visual Basic you must provide an IEnumerator implementation which is returned by GetEnumerator. When developing with C# you must provide a class that contains a Current property, and MoveNext and Reset methods as described by IEnumerator, but the class does not have to implement IEnumerator.

Hire a remote developer
Looking to add more bandwidth to your software team? Web Developers, designers, testers are now available on demand. Flexible hours, very competitive rates, expert team and High Quality work.