.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 之间有什么区别吗?


- 输入按键事件处理程序 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01