string myTown = document.Element("GeocodeResponse").Element("result").Elements("address_component").Where(x => (string)x.Element("type").Value == "locality").Select(x => x.Element("long_name").Value).First();
List<GeocoderLocation> geoList = new List<GeocoderLocation>(); geoList = (from result in document.Descendants("result") select new GeocoderLocation { Town = result.Elements("address_component").Where(x => (string)x.Element("type").Value == "locality").Select(x => x.Element("long_name").Value).First(), }).ToList();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)