February 6th, 2008

LinQ

About a year ago I said I would make a post about LinQ. Now that Visual Studio 2008 is out, and LinQ is a released technology, I think I can get around to it. I still haven’t built a project that makes a good use of LinQ, but I’ve got a fairly good understanding of it, and found some interesting ways to use it.

Now, you may be wonder what LinQ is, and what it stands for. The answer is that it stands for Language INtegrated Query. It is an extension to C# and VB.NET that allows you to use a SQL-like syntax for constructing queries against a wide variety of data sources. The most obvious example is XML, but you can also use most of the built in data structures in the .NET framework as well.

With that out of the way, on to an example or two of how I’ve managed to use LinQ, and what the challenges that I’ve run into are.
Read the rest of this entry »