gpt4 book ai didi

c# - 为什么没有文化枚举?

转载 作者:太空狗 更新时间:2023-10-29 18:03:38 25 4
gpt4 key购买 nike

问候,

我想知道为什么 C# 中没有针对文化的预设枚举?由于文化永远不会改变,而且总是像“nl-NL、en-GB、en-US”。为什么不为它做一个枚举,让事情变得简单一点呢?

[编辑]

如前所述,文化确实会发生变化……但并非全部。为什么不制作一个包含所有文化并提供添加/更改它们的可能性的枚举/类类型?

最佳答案

"Since the cultures never change"

不是吗? This article (Microsoft .NET Framework 4: What is New in Globalization)不同意。仅在过去 5 年里,塞尔维亚地区就发生了很多变化,催生了新的文化。

In the real world, the globalization information is constantly changing because of cultural developments in the local markets, because of new standards which update the culture sensitive information frequently, or because Microsoft finds more accurate information about different markets or expands into more markets.

Microsoft .NET Framework 4 supports a minimum of 354 cultures compared to a minimum of 203 cultures in the previous release. Many of those cultures are neutrals that were added to complete the parent chain to the root neutral culture.

For example, three Inuktitut neutrals were added to the already existing cultures Inuktitut (Syllabics, Canada) and Inuktitut (Latin, Canada)

此外,我猜枚举本身没有意义。 CultureInfo 不仅仅是一个名称,查找提供了更大的灵 active 和独立性,不受任何政治变化的影响,其中的变化比我们通常意识到的要多得多。

关于c# - 为什么没有文化枚举?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5726905/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com