.NET: Are there any differences between InvariantCulture and en-US?

后端 未结 6 1133
感情败类
感情败类 2020-11-30 06:04

Given the following two cultures:

CultureInfo c1 = InvariantCulture;
CultureInfo c2 = new CultureInfo(\"en-US\");

and i were to examine eve

6条回答
  •  眼角桃花
    2020-11-30 06:16

    I know they have a different CultureName and LCID (see this list).

    Additionally, the currency symbols are different - ¤ for InvariantCulture and $ for en-US.

    From InvariantCulture:

    It is used in almost any method in the Globalization namespace that requires a culture.

    Suggesting that for the most part, they are interchangeable. However, the names do state intent, so you should think about that when using CultureInfo.

提交回复
热议问题