.NET: Are there any differences between InvariantCulture and en-US?(.NET:InvariantCulture 和 en-US 之间有什么区别吗?)
问题描述
鉴于以下两种文化:
CultureInfo c1 = InvariantCulture;
CultureInfo c2 = new CultureInfo("en-US");
我要检查两种文化特有的每条信息,例如:
and i were to examine every piece of information specific to both cultures, e.g.:
c1.DateTimeInfo.ShortDatePattern;
c2.DateTimeInfo.ShortDatePattern;
c1.DateTimeInfo.LongDatePattern;
c2.DateTimeInfo.LongDatePattern;
c1.NumberFormat.CurrencyDecimalDigits;
c2.NumberFormat.CurrencyDecimalDigits;
c1.TextInfo.IsRightToLeft;
c2.TextInfo.IsRightToLeft;
我会发现有什么不同吗?
Would i find any differences?
换句话说,InvariantCulture 是否与en-US"文化相同?
In other words, is the InvariantCulture, for all purposes, identical to the "en-US" culture?
推荐答案
是的.
例如:InvariantCulture 使用国际货币符号:¤";与美元符号:$";格式化货币时.
For example: InvariantCulture uses the international symbol for currency: "¤" versus the dollar sign: "$" when formatting currency.
然而,在大多数情况下,它们非常相似.
For the most part, however, they're very similar.
这篇关于.NET:InvariantCulture 和 en-US 之间有什么区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:.NET:InvariantCulture 和 en-US 之间有什么区别吗?
基础教程推荐
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 如果条件可以为空 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 从 C# 控制相机设备 2022-01-01
- 将数据集转换为列表 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
