Anders unveils LINQ! (and XLinq)

In Jim Allchin's keynote At PDC2005 today Anders Hejlsberg showed the LINQ project for the first time.  LINQ stands for Language Integrated Query.  The big idea behind LINQ is to provide a consistent query experience across different "LINQ enabled" data access technologies AND to allow querying these different data access technologies in a single query.  Out of the box there are three LINQ enabled data access technologies that are being shown at PDC.  The first is any in-memory .NET collection that you foreach over (any .NET collection that implements IEnumerable<T>).  The second is DLinq which provides LINQ over a strongly typed relational database layer.  The third, which I have been working on for the last 6 months or so (along with Anders and others on the WebData XML team), is XLinq, a new in-memory XML programming API that is Language Integerated Query enabled.  It is great to get the chance to get this technology to the next stage of development and get all of you involved.  The LINQ Preview bits (incuding XLinq and DLinq) are being made available to PDC attendees.  More information on the LINQ project (including  the preview bits) are also available online at   

More specifically about XLinq, XLinq is a new in-memory XML programming API that is LINQ enabled.  Essentially it is a redesigned XML DOM API that was built from the ground up with lessons from the last 10 years of DOM as well as with Language Integrated Query in mind.  There are some significant innovations from DOM that are outlined in the XLinq overview document but one very important aspect was taking advantage of modern language features such as generics, nullable types, and especially IEnumerable<T>.  XLinq takes advantage of the 30 some odd Standard Query Operators (like where, select, orderby, groupby, etc.) from LINQ and then layers in a set of XML specific query operators that help when you are querying an XML tree - operators like Descendants, Ancestors, Parent, etc.  With the standard query operators combined with the XML specific query operators you get fully featured XML Query functionality that is Language Integrated (assuming the the language implements the LINQ pattern, which C#, VB, and C++ are planned).   In the samples that install with the LINQ bits there are hundreds of queries that you can check out including many from the XQuery Use Cases.  There is an Xlinq overview doc that is posted on the LINQ Project site.  Here is a direct link:

Anders has a detailed presentation tomorrow on LINQ and I am presenting more on XLinq on Friday.  I'll post more details over the days and weeks ahead.  I look forward to your feedback!