Var x As Double = 22.5
MessageBox x.ToString(Locale.Raw)
TextFieldX.Text = x.ToString(Locale.Raw)
x = TextFieldX.Text.ToDouble
MessageBox x.ToString(Locale.Raw)
Var currentLocale As Locale
currentLocale = currentLocale.Current
MessageBox (currentLocale.Identifier) // show en_ES
Var x As Double = 22.5 // in debugger shows as 22,5
MessageBox x.ToString // show 22.5
TextFieldX.Text = x.ToString(Locale.Raw)
MessageBox TextFieldX.Text // show 22.5
x = TextFieldX.Text.ToDouble
MessageBox x.ToString // show 225
In the window TextFieldX shows as 22.5
In the debugger TextFieldX shows as 22.5 but
when x = TextFieldX.Text.ToDouble, x = 225
Documentation:
source = “123.45”
result = source.ToDouble ’ returns 123.45
Var x As Double = 22.5
var en_ES as new Locale("en_ES")
MessageBox x.ToString(en_ES)
TextFieldX.Text = x.ToString(en_ES)
x = TextFieldX.Text.ToDouble
MessageBox x.ToString(en_ES)
results: 22,5 and 225.
Are you sure you see 22.5 and not 22,5?
Maybe it looks different if the OS is set to US or en_ES?
Edit: could it be that you changed the OS settings to show . instead of , for decimal separator? and converting 22,5 to 225? try with 2222.5