using System.Collections.Generic;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
public static void Main()
Dictionary<string, City> city = new Dictionary<string, City>();
city.Add("St. John's", new City(100645,"Newfoundland and Labrador"));
city.Add("HALIFAX", new City(372680,"NOVA SCOTIA"));
city.Add("FREDERICTON", new City(34000,"NEW BRUNSWICK"));
city.Add("CHARLOTTETOWN", new City(34562,"PRINCE EDWARD ISLAND"));
city.Add("QUÉBEC", new City(8180000,"QUEBEC"));
city.Add("TORONTO", new City(2791140,"Ontario"));
city.Add("WINNIPEG", new City(633450,"MANITOBA"));
city.Add("REGINA", new City(179245,"SASKATCHEWAN"));
city.Add("EDMONTON", new City(730375,"ALBERTA"));
city.Add("Victoria", new City(78055,"BC"));
city.Add("IQALUIT",new City(6699,"NUNAVUT"));
city.Add("YELLOWKNIFE",new City(19234,"NORTHWEST TERRITORIES"));
city.Add("WHITEHORSE",new City(27889,"YUKON"));
Console.WriteLine("{0} is a city in {1}", c.Key,c.Value.province);
Console.WriteLine("--------------------------------------------------");
var set = new HashSet<string>();
set.Add("NEW YORK CITY");
set.Add("ECATEPEC DE MORELOS");
set.IntersectWith(city.Keys);
Console.WriteLine("{0} is in Canada and also in the top 10 largest cities in North America.", I);
public int population { get; set; }
public string province { get; set; }
public City(int population, string province)
this.population = population;
this.province = province;