Goal:
Convert 58.0359401 to decimal without any bug.
Problem:
When I use WPF in my local computer, it doesn't work.
However when I use .Net fiddle (https://dotnetfiddle.net/txro1e) and OnlineGDB (https://onlinegdb.com/HkWbvR-AU) it works.
Questions are:
Do you get the same result if you use the source code in your local computer?
If not, how do you solve it in order to achieve the goal?
If not, how is it possible that two different result could be achieved?
Thank you!
private void Button1_Click(object sender, RoutedEventArgs e)
{
string test1 = "58.0359401";
decimal test2 = 58.0359401M;
decimal output;
bool isTrue = decimal.TryParse(test1, out output);
Console.WriteLine(isTrue);
}
