C# 浮点数国际化

The NumberDecimalSeparator for the culture ru-RU is "," whereas in en-US, it's ".". Some cultures use a comma, some use a period. If you need something, well, Invariant, try InvariantCulture:

float.TryParse("0.58", NumberStyles.Any, CultureInfo.InvariantCulture, out f);

你可能感兴趣的:(C# 浮点数国际化)