Double and float values are not saved/loaded correctly on system with a language where the decimal symbol is "," instead of "."
Currently I tested this in a WPF app and on UWP, WPF fails, while UWP shows no such problem. I'll run this same test on android but don't have the means to test it on iOS. Will update this post or comments with further findings, when I have the time.
Bug Information
Version Number of Plugin: 3.1.1
Device Tested On: Windows 10
Simulator Tested On:
Version of VS: Visual Studio 2017
Version of Xamarin: -
Versions of other things you are using: -
Open System Settings "Region & Language", click on "Additional date, time, & regional settings", click on "Change date, time, or number formats", select a format that uses "," instead of "." as decimal symbol or set this manually by going to "Additional settings..."
Run wpf project
Expected Behavior
Each line should end in "True". Double result should be 4.3, float should be 1.4.
Values should be saved in a culture independed way, to account for the user switching system language/number format.
Actual Behavior
Double and float both fail to be correctly handled. Both ignore the decimal symbol resulting in values of 43 instead of 4.3 and 14 instead of 1.4. Decimal variable is correct though.
Correct result, when systems language is set to a language having "." as decimal symbol.
Double and float values are not saved/loaded correctly on system with a language where the decimal symbol is "," instead of "."
Currently I tested this in a WPF app and on UWP, WPF fails, while UWP shows no such problem. I'll run this same test on android but don't have the means to test it on iOS. Will update this post or comments with further findings, when I have the time.
Bug Information
Version Number of Plugin: 3.1.1 Device Tested On: Windows 10 Simulator Tested On: Version of VS: Visual Studio 2017 Version of Xamarin: - Versions of other things you are using: -
Steps to reproduce the Behavior
Create a new WPF project
Add Xam.Plugins.Settings nuget package
Add this code after "InitializeComponent();"
Open System Settings "Region & Language", click on "Additional date, time, & regional settings", click on "Change date, time, or number formats", select a format that uses "," instead of "." as decimal symbol or set this manually by going to "Additional settings..."
Run wpf project
Expected Behavior
Each line should end in "True". Double result should be 4.3, float should be 1.4.
Values should be saved in a culture independed way, to account for the user switching system language/number format.
Actual Behavior
Double and float both fail to be correctly handled. Both ignore the decimal symbol resulting in values of 43 instead of 4.3 and 14 instead of 1.4. Decimal variable is correct though.
Correct result, when systems language is set to a language having "." as decimal symbol.
Code snippet
see above