using System.Collections.Generic;
public static void Main()
string[] names = new string[]{"Joe","James","Bill","Sally", "Jill", "Jane"};
IEnumerable<string> query = from c in names
Console.WriteLine("Query Syntax");
foreach (string str in query)
IEnumerable<string> method = names.Where(n => n.StartsWith("J"));
Console.WriteLine("Method Syntax");
foreach (string str in method)