[SOLVED] double.TryParse bug in browser

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
rkmore
Posts: 55
Joined: Mon Dec 07, 2015 1:53 pm

[SOLVED] double.TryParse bug in browser

Postby rkmore » Sat Mar 03, 2018 5:21 am

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

sebas
Posts: 21
Joined: Fri Oct 27, 2017 7:03 am

Re: double.TryParse bug in browser

Postby sebas » Mon Mar 05, 2018 2:25 am

may be it depends from regional settings?
what is delmitter?

rkmore
Posts: 55
Joined: Mon Dec 07, 2015 1:53 pm

Re: double.TryParse bug in browser

Postby rkmore » Thu Mar 08, 2018 4:12 am

Good thought! Unfortunately the delimiter is '.' this is definitely a minor bug.

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: double.TryParse bug in browser

Postby JS-Support @Userware » Fri Mar 09, 2018 5:19 am

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


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 26 guests

 

 

cron