I'm using visual studio code on windows, creating mvc app using latest asp.net core.
when I run this code:
string number = "13,89";
float convertedNumber = -1f;
bool result = float.TryParse(number, NumberStyles.Any, CultureInfo.InvariantCulture, out convertedNumber);
I get result = true, indicating that parsing was successful, but actual convertedNumber = 1389;
I tried different cultures, different numberstyles and I just don't get it. I would understand getting result = false, but not this. and I have no idea how to fix it.
c# fiddle for convenience: https://dotnetfiddle.net/0ZDwis