<p>I've got a CSV file containing latitude and longitude values, such as:</p>

<blockquote>
  <p>"25°36'55.57""E","45°39'12.52""N"</p>
</blockquote>

<p>Anyone have a quick and simple piece of C# code to convert this to double values?</p>

<p>Thanks</p>

If you mean C# code to do this:
result = 25 + (36 / 60) + (55.57 / 3600)
First you'll need to parse the expression with Regex or some other mechanism and split it into the individual parts. Then:
```
```
String hour = "25";
String minute = "36";
String second = "55.57";
Double result = (hour) + (minute) / 60 + (second) / 3600;
```
```
And of course a switch to flip sign depending on N/S or E/S. Wikipedia has a little on that:
For calculations, the West/East suffix is replaced by a negative sign in the western hemisphere. Confusingly, the convention of negative for East is also sometimes seen. The preferred convention -- that East be positive -- is consistent with a right-handed Cartesian coordinate system with the North Pole up. A specific longitude may then be combined with a specific latitude (usually positive in the northern hemisphere) to give a precise position on the Earth's surface.
  (
http://en.wikipedia.org/wiki/Longitude
)