LINQ to Objects

LINQ to Objects is used for accessing in-memory objects. LINQ to Objects is essentially the default LINQ implementation. It requires only the System.Core.Dll library, which is implicitly referenced in .NET Framework 3.5. Other providers, such as LINQ to SQL, require an additional interface and library. The source type for LINQ to Objects should implement the IEnumerable<T> interface. In addition, LINQ to Objects works with anything that can be described via an iterator. This provides considerable flexibility as to the range of data that is compatible with LINQ to Objects. The Factorial example presented earlier in this chapter is a perfect example. There are several advantages to using LINQ to Objects:

  • You can access in-memory objects ...

Get Programming Microsoft® Visual C#® 2008: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.