public static Location GetCopy(Location location) {
     return new Location {
         Street = location.Street,
         StreetNr = location.StreetNr,
         PostalCode = location.PostalCode,
         City = location.City,
         Country = location.Country,
         Geolocation = location.Geolocation
     };
 }
            public void TomTomGetDistance()
            {
                Location locA = new Location();
                Location locB = new Location();

                locA.Geolocation = "51.2087575,4.4335285";
                locB.Geolocation = "52.373166,4.89066";

                TomTomService tomtom = new TomTomService();

                tomtom.GetDistance(locA,locB);

               
            }
        public void GetDistance(Location locationA, Location locationB)
        {
            var client = new HttpClient();
            string baseurl = "https://api.tomtom.com/lbs/services/route/3/";
            string apiCode = "/Quickest/xml?key=cnjzskcgdmzd25xkq6eudpqc";
            string url = baseurl + locationA.Geolocation + ":" + locationB.Geolocation + apiCode;
            string totalDistanceMeters;

            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));

            HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
            HttpWebResponse response = request.GetResponse() as HttpWebResponse;         

            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(response.GetResponseStream());

            //*[local-name()="summary"]
            XmlNode node = xmlDoc.SelectSingleNode("//*[local-name()='totalDistanceMeters']");
            if (node != null)
                totalDistanceMeters = node.InnerText;
            /*totalDistanceMeters*/
                        
        }