Page 1 of 1

[SOLVED] double.TryParse bug in browser

Posted: Sat Mar 03, 2018 5:21 am
by rkmore
Found in RC1
In the browser (but not in the emulator) double.TryParse returns true (and the wrong result) for strings that should return false.

Example:

double dval;
if (double.TryParse("123.45.67", out dval))
{
TextBox1.Text = dval.ToString();
}

results in "123.45" and returns true.

RKM

Re: double.TryParse bug in browser

Posted: Mon Mar 05, 2018 2:25 am
by sebas
may be it depends from regional settings?
what is delmitter?

Re: double.TryParse bug in browser

Posted: Thu Mar 08, 2018 4:12 am
by rkmore
Good thought! Unfortunately the delimiter is '.' this is definitely a minor bug.

Re: double.TryParse bug in browser

Posted: Fri Mar 09, 2018 5:19 am
by JS-Support @Userware
Hi,

We have fixed this issue. The fix is available in v1.1 Beta1 and newer, which you can download from:
http://forums.cshtml5.com/viewforum.php?f=6

Thanks.
Regards,
JS-Support