Hello all,

In a desktop database application i encountered a really interesting situation. I write a double value into a textbox as usual. Then i convert the value into double to use in a calculation but the original value is lost !

double doubleVal = 0.0 ;

doubleVal = Convert::ToDouble(textBox3->Text) // <- 8.5

// Here doubleVal not equals 8.5 , doubleVal outputs 85 or doubleVal inserts 85 in a table !!!!!!!!!!!!!!

Do smb know the reason ?

``````// decleration

double doubleVal = 0.0 ;

doubleVal = Convert::ToDouble(textBox3->Text) //  <- 8.5

//doubleVal not equals 8.5 , doubleVal outputs 85 !!!!!!!``````

Anwer is very simple and it's about cultures different understandings about double.
If smb needs answer i can help.

@sheenanve. Could you please explain what is the reason? Your current post doesn't help.

Anwer is very simple and it's about cultures different understandings about double.
If smb needs answer i can help.

@sheenanve. Could you please explain what is the reason? Your current post doesn't help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.