EditQ. What is LINQ?
LINQ is a set of language features introduced in .NET 3.5 (shipping Visual Studio 2008) that allow you to write queries similar to SQL like statements in Visual Basic or C# programs (other language support is available, but these are the main ones). LINQ knows the data-source you are trying to query (SQL Server, object collection, XML, or another source) and executes the query expression returning the result in the form you ask.
EditQ. What is LINQ to XML?
LINQ to XML is a specific LINQ implementation for working with XML data. LINQ to XML provides a new way to create and manipulate XML data. There are many LINQ to XML features that don't specifically relate to writing LINQ queries, in fact the majority form a new XML API. See:
LINQ to XML main page, and
LINQ to XML 5 minute overview.
EditQ. How do I enable LINQ to XML in my code?
To use LINQ to Objects in Visual Studio 2008 -
1) add a reference to the
System.Xml.Linq.dll (if it is grayed out, go to your project properties and set the target framework to .NET 3.5)
2) add the following using statement at the top of your class file:
using System.Data.Linq; EditQ. What versions of C# Supports LINQ?
C#3.0 that ships in the .NET 3.5 framework as part of Visual Studio 2008 supports LINQ. It was possible to run a LINQ preview in Visual Studio 2005 mid 2006, but as the beta releases of Visual Studio 2008 became available this support was dropped.
EditQ. Do I need to know LINQ syntax to program?
No. Developing using LINQ is completely optional. LINQ does remove a lot of the traditional XML API complexity found in the alternative XML API's.
EditQ. What .NET languages currently support LINQ?
Currently C# and Visual Basic shipping with the .NET Framework 3.5 (in Visual Studio 2008) have specific language features and debugger support for LINQ.