Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CultureInfo.InvariantCulture in YDW #111

Closed
radiolondra opened this issue Jan 30, 2022 · 1 comment
Closed

Use CultureInfo.InvariantCulture in YDW #111

radiolondra opened this issue Jan 30, 2022 · 1 comment

Comments

@radiolondra
Copy link

Reading the YDW code, in string to double conversions you should at least use CultureInfo.InvariantCulture, otherwise in countries where the decimal separator is "comma" (like here in Italy) calls like this one:

if (double.TryParse(percentageNumberString, out var percentageNumber))                    
{
    ProgressPercentageValue = percentageNumber;                        
}

will not work.

It could be changed in something like this:
ProgressPercentageValue = double.Parse(percentageNumberString, System.Globalization.CultureInfo.InvariantCulture);

@database64128
Copy link
Owner

Thank you for reporting! A fix is coming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants