- Core Concepts
- IEnumerable serves as the foundation for all non-generic collections that can be iterated
- It necessitates the implementation of the GetEnumerator() method
- The IEnumerator interface provides the MoveNext() and Reset() methods
- Extension Methods
- Cast<TResult> enables the conversion of IEnumerable to a specific type
- OfType<TResult> filters the collection based on the specified type
- AsParallel() facilitates the utilization of PLINQ for parallel processing
- AsQueryable() transforms IEnumerable into the IQueryable interface
- Implementation Details
- The Current property indicates the position of the enumerator
- The Reset() method restores the enumerator's position
- The MoveNext() method advances the enumerator until the end of the collection
- The Current property remains unchanged until the MoveNext() or Reset() are invoked