Click here to Skip to main content
15,914,066 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I'm developing a application in Smart Device using C# in that I used Double.TryParse and it is giving error: 'double' does not contain a definition for 'TryParse'. Please send code for this.
My code is:
NOTE: Given that first answer is not working I tried:
C#
private void MapCurrentLocBtn_Click(object sender, EventArgs e)
{
    double lat, lon;
    if (internetConnected && Double.TryParse(currentLatitudeTbx.Text, out lat)
        && Double.TryParse(currentLongitudeTbx.Text, out lon))
}
Posted
Updated 11-Feb-10 2:36am
v7

You could try the double.Parse or Convert.ToDouble in a try catch ?
 
Share this answer
 
If C# Compact Edition does not support Convert.ToDouble, or double.Parse, then it's pretty close to useless as far as I can see. you must be doing something wrong.
 
Share this answer
 
You may try System.Convert, but, I guess, without luck.
Possibly you have to perform yourself the parsing.
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900