var customers = new[] { new {CustomerID=1,FirstName="Kim",LastName="Abercrombie",CompanyName="Alpine Sky House"},new {CustomerID=2,FirstName="Jeff",LastName="Hay",CompanyName="Coho Winery"},new {CustomerID=3,FirstName="Charlie",LastName="Herb",CompanyName="Alpine Sky House"},new {CustomerID=4,FirstName="Chris",LastName="Preston",CompanyName="Trey Reseach"},new {CustomerID=5,FirstName="Dave",LastName="Barnett",CompanyName="Wingtip Toys"},new {CustomerID=6,FirstName="Ann",LastName="Beebe",CompanyName="Coho Winery"},new {CustomerID=7,FirstName="John",LastName="Kane",CompanyName="Wingtip Toys"},new {CustomerID=8,FirstName="David",LastName="Simpson",CompanyName="Trey Reseach"},new {CustomerID=9,FirstName="Greg",LastName="Abercrombie",CompanyName="Wingtip Toys"},new {CustomerID=10,FirstName="Tim",LastName="Abercrombie",CompanyName="Wide World Importers"}};var addresses = new[] { new {CompanyName="Alpine Sky House",City="Berne",Country="Switzerland"},new {CompanyName="Coho Winery",City="San Francisco",Country="United States"},new {CompanyName="Trey Reseach",City="New York",Country="United States"},new {CompanyName="Wingtip Toys",City="London",Country="United Kingdom"},new {CompanyName="Wide World Importers",City="Tetbury",Country="United Kingdom"}};IEnumerable<string> customerFirstNames = customers.Select(cust=>cust.FirstName);var customerFirstNames = from custs in customers select custs.FirstName;var usCompanies=addresses.Where(addr=>String.Equals(addr.Country,"United States")).Select(usComp=>usComp.CompanyName);var usCompanies=from addr in addresses where String.Equals(addr.Country,"United States") select addr.CompamyName;var companyNames=addresses.OrderBy(addr=>addr.CompanyName).Select(comp=>comp.CompanyName);var companyNames=from addr in addresses orderby addr,CompanyName select addr.CompanyName; var companiesGroupedByCountry=addresses.GroupBy(addrs=>Country);var companiesGroupedByCountry=from addr in addresses group addr by addr.Country; var citiesAndCustomers=Customers.Select(c=>new{c.FirstName,c.LastName,c.CompanyName}).Join(addresses,custs=>custs.CompanyName,addrs=>addrs.CompanyName,(custs,addrs)=>new{custs.FirstName,custs.LastName,addrs.Country});var citiesAndCustomers=from a in addresses join c in customers on a.CompanyName equals c.CompanyName select new{c.FirstName,c.LastName,a.Country};