LINQ C# Book

C# provides another syntax for writing queries, called query expression syntax.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main()
{
string[] names = { "C", "Java", "C#", "Javascript" };
IEnumerable filteredNames = from n in names
where n.Contains("a")
select n;
foreach (string name in filteredNames)
Console.WriteLine(name);
}
}

The output:
Java
Javascript