.NET:InvariantCulture 和 en-US 之间有什么区别吗? [英] .NET: Are there any differences between InvariantCulture and en-US?

查看:22
本文介绍了.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 之间有什么区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆