LINQ Learning Guide: LINQ to Objects

This section of the LINQ Learning Guide examines how the LINQ to Objects implementation can be used with IEnumerable data collections.




   LINQ Quick Start
   LINQ and Visual Studio 2008's new language features
   LINQ Providers
   LINQ and Web applications
   LINQ to Objects
   LINQ to XML
   LINQ to SQL
   LINQ to DataSet
   LINQ to Entities
   Third-party LINQ Implementations


LINQ to Objects

LINQ works with any IEnumerable or IEnumerable(T) collection. Certain implementations cover XML and ADO.NET data types. LINQ to Objects covers pretty much everything else -- array lists, strings, file systems and so on.

This section of the LINQ Learning Guide links to helpful LINQ to Objects tutorials. The subsequent section covers LINQ to XML.

LINQ to Objects (Microsoft)
This MSDN page offers a quick look at LINQ to Objects and links to more in-depth articles that illustrate how to use LINQ with array lists, strings, file systems and other data collections.

LINQ to Objects five-minute overview (Hooked on LINQ)
Among the tidbits in this post is a list of the various operators available for LINQ to Objects.

LINQ to Objects -- Part 1, Part 2 and Part 3 (Ged Mead)
Part 1 of this series compares the code used to run queries in Visual Basic 2005 with code for the same queries in Visual Basic 2008, ending with a simple LINQ to Objects query. The queries get exceedingly complex in Parts 2 and 3.

Welcome to LINQ-SQO (CodePlex)
Standard Query Operators are at the heart of LINQ, particularly the LINQ to Objects implementation. This CodePlex project by Bart de Smet demonstrates how they work.

How LINQ to Objects queries work (Wes Dyer)
This article jumps into the Visual Studio debugger to determine why LINQ to Objects behaves the way it does. Doing this teaches two things, this blogger notes -- "Laziness enables the ability to work with infinite sequences" and "Operations which require the entire source to be examined change the order of evaluation."

A model for query interpretation and Another model for query interpretation (Wes Dyer)
These two posts describe in great detail imperative and declarative models for LINQ to Objects query interpretation.

Taking LINQ to Objects to extremes: A fully LINQified ray tracer (Luke Hoban)
Initially this blogger on the C# team at Microsoft built his ray tracer in C# 3.0 without using LINQ at all. Then he discovered that he could write a single 60-line LINQ to Objects query expression to build his ray tracer. So he did.

LINQ to Objects and JavaScript (Nikhil Kothari)
The exact syntax of LINQ doesn't necessarily carry over to JavaScript, but the concepts do. Here the author of Script#, a C# compiler that generates JavaScript, explains how these concepts and constructs apply. It's worth considering if you dabble in Ajax, Kothari suggests.


*** Go on to the final section of the LINQ Learning Guide: LINQ to XML

Dig Deeper on Visual Studio 2008 and Language Integrated Query (LINQ)

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.