M
Mika M
Hi,
Just for fun I'm trying to parse my GPS position string using C# 2005.
When my code is trying to parse latitude string to double value like...
double.Parse(items[2]); // items[2] = "6215.1058"
....I'll just get an error. What's wrong with that?
Immediate Window:
?items
{Dimensions:[15]}
[0]: "GPGGA"
[1]: "065026.000"
[2]: "6215.1058"
[3]: "N"
[4]: "02546.1629"
[5]: "E"
[6]: "1"
[7]: "05"
[8]: "2.7"
[9]: "171.8"
[10]: "M"
[11]: "19.7"
[12]: "M"
[13]: ""
[14]: "0000*5E\r\n"
?items[2]
"6215.1058"
?double.Parse(items[2])
'double.Parse(items[2])' threw an exception of type 'System.FormatException'
base {System.SystemException}: {"Input string was not in a correct
format."}
Now you know at least where I am right now
Just for fun I'm trying to parse my GPS position string using C# 2005.
When my code is trying to parse latitude string to double value like...
double.Parse(items[2]); // items[2] = "6215.1058"
....I'll just get an error. What's wrong with that?
Immediate Window:
?items
{Dimensions:[15]}
[0]: "GPGGA"
[1]: "065026.000"
[2]: "6215.1058"
[3]: "N"
[4]: "02546.1629"
[5]: "E"
[6]: "1"
[7]: "05"
[8]: "2.7"
[9]: "171.8"
[10]: "M"
[11]: "19.7"
[12]: "M"
[13]: ""
[14]: "0000*5E\r\n"
?items[2]
"6215.1058"
?double.Parse(items[2])
'double.Parse(items[2])' threw an exception of type 'System.FormatException'
base {System.SystemException}: {"Input string was not in a correct
format."}
Now you know at least where I am right now
