Sven Nijs

Sven Nijs

  • NA
  • 14
  • 0

Converting a string into double

Jan 4 2010 3:46 AM
I'm trying to convert a string into a doble in this way:

string latitude = reader.GetAttribute("lat");
string longitude = reader.GetAttribute("lon");
double lat = Convert.ToDouble(latitude);
double lon = Convert.ToDouble(longitude);

When latitude has a value of: 51.66777, lat has a value of 51667777... The same problem for longitude. When I convert the string, the point disappear. Can someone help me?

Thanks!

Answers (8)