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


基础教程推荐
- 全局 ASAX - 获取服务器名称 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01