LANGUAGE

LINQ query syntax

C# query expression translated into compatible query method calls.

Formal Syntax & Structure

csharp syntaxcsharp
from item in source where condition select expression

Working Example

Example Snippetcsharp
using System;using System.Linq;var q = from n in new[] {1,2} where n > 1 select n;
C# & .NET Reference