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

查看:260
本文介绍了.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.

修改的en-US 和不变差异列表P>

Edit: List of differences between en-US and Invariant:

                          en-US                        Invariant
=====================     ==================           ==================
Number                    123456.78                    +123456.78
Currency Symbol           $                            ¤
Currency                  $123456.78                   ¤123456.78
Short Date                1/11/2012                    01/11/2012
Time                      10:36:52 PM                  22:36:52
Metric                    No                           Yes
Long Date                 Wednesday, January 11, 2012  Wednesday, 11 January, 2012
Year Month                January, 2012                2012 January

这篇关于.NET:是否有InvariantCulture的之间和en-US什么区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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