text: Walkthrough: Writing Queries in Visual Basic
  Updated: September 2008
  This walkthrough guides you through the new Visual Basic 2008 language features and demonstrates how they are used to write Language-Integrated Query (LINQ) query expressions. The walkthrough demonstrates how to create queries on a list of Student objects, how to run the queries, and how to modify them. The queries incorporate several new features.
  For a video demonstration, see Video How to: Writing Queries in Visual Basic.
  To create a project that targets version 3.5 or later of the .NET Framework
  Start Visual Studio 2008.
  On the File menu, click New Project.
  Click Console Application and then click OK.
  A project is created. By default, it contains a reference to System.Core.dll and an Imports statement for the System.Linq namespace, both of which are needed in order to run LINQ queries., which are new in Visual Basic 2008. For more information, see Object Initializers: Named and Anonymous Types.. Anonymous types are a new feature in Visual Basic 2008. You use them in queries when you want to return several fields from the data source rather than complete records (currentStudent records in previous examples) or single fields (First in the preceding section). Instead of defining a new named type that contains the fields you want to include in the result, you specify the fields in the Select clause must be inferred because the Select clause
  After you are familiar with the basic concepts of working with queries, you are ready to read the documentation and samples for the specific type of LINQ provider that you are interested in: