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 ?

Thanks in advance.

// 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.