O'Reilly logo

Pro LINQ: Language Integrated Query in C# 2008 by Joseph C. Rattz Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

IEnumerable<T>, Sequences, and the Standard Query Operators

IEnumerable<T>, pronounced I enumerable of T, is an interface that all of the C# 2.0 generic collection classes implement, as do arrays. This interface permits the enumeration of a collection's elements.

A sequence is a logical term for a collection implementing the IEnumerable<T> interface. If you have a variable of type IEnumerable<T>, then you might say you have a sequence of Ts. For example, if you have an IEnumerable of string, written as IEnumerable<string>, you could say you have a sequence of strings.

NOTE

Any variable declared as IEnumerable<T> for type T is considered a sequence of type T.

Most of the Standard Query Operators are extension methods in the System.Linq.Enumerable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required