LINQ and IEnumerable Type

Learn about LINQ and IEnumerable type.

We'll cover the following

The IEnumerable type

LINQ is a set of extension methods on the IEnumerable type. The IEnumerable type represents objects we can loop through like arrays, lists, dictionaries, and others.

The IEnumerable type has a GetEnumerator() method. It returns an IEnumerator. With this IEnumerator we can iterate over collections, since it has a MoveNext method and a Current property. The MoveNext method moves the enumerator to the next position, and the Current property holds the element at the given position.

Get hands-on with 1400+ tech skills courses.