using System.Collections.Generic;
public static void Main()
Console.WriteLine("Hello World");
List<Employee> employees = new List<Employee>() {
FirstName = "John", LastName = "Smith", City = "Havertown", State = "PA"
FirstName = "Jane", LastName = "Doe", City = "Ewing", State = "NJ"
FirstName = "Jack", LastName = "Jones",
City = "Fort Washington", State = "PA"
List<Hometown> hometowns = new List<Hometown>() {
City = "Havertown", State = "PA", CityCode = "1234"
City = "Ewing", State = "NJ", CityCode = "5678"
City = "Fort Washington", State = "PA",
var result = from e in employees
on new {e.City,e.State} equals new {s.City,s.State}
select new {e.LastName,s.CityCode};
Console.WriteLine(n.LastName + ", " + n.CityCode);
public string City { get; set; } public string State { get; set; } public string CityCode { get; set; }
public string FirstName { get; set; } public string LastName { get; set; } public string City { get; set; } public string State { get; set; }