美文网首页
C# 浮点数国际化

C# 浮点数国际化

作者: QuinShuai | 来源:发表于2019-01-04 12:01 被阅读0次

    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# 浮点数国际化

          本文链接:https://www.haomeiwen.com/subject/dayhrqtx.html