Home Dashboard Directory Help
Search

Bug in double.TryParse by quandary1


Status: 

Closed


1
0
Sign in
to vote
Type: Bug
ID: 785552
Opened: 4/25/2013 3:39:35 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

double tryparse doesn't accept a whitespace between +/- and the actual number.

http://stackoverflow.com/questions/16211681/regular-expression-for-validate-price-in-decimal/16211711#16211711
Details
Sign in to post a comment.
Posted by Microsoft on 4/26/2013 at 10:28 AM
Hi quandary1

Thanks for bringing up this interesting issue. We are always grateful when customers point towards potential concerns - this helps us ensure the quality of the .NET Framework and driving the product into the right direction.

If you take a look at the documentation for double.TryParse(string) (http://msdn.microsoft.com/en-us/library/994c0zb1.aspx) you will see that the accepted form for a string containing a double is:

[ws][sign][integral-digits,]integral-digits[.[fractional-digits]][e[sign]exponential-digits][ws]

Which means that a whitespace is not allowed between the sign and the number.

Thanks,
Alex Ghiondea
.NET Framework Team
Posted by Microsoft on 4/25/2013 at 11:45 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 4/25/2013 at 3:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.