Why isn't there a culture enum?

前端 未结 4 1942
执笔经年
执笔经年 2021-02-20 18:20

Greetings,

I was wondering why there isn\'t a pre-set enum for cultures in C#? Since the cultures never change and are always like \"nl-NL, en-GB, en-US\".. why not make

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-20 18:58

    Enumerations are fixed at compile time.

    But the set of cultures varies at runtime:

    • Different OS versions support different cultures
    • OS updates (Service Packs, Language Interface Packs, ...) can add cultures
    • Later .NET versions support more cultures (build assembly for one version and use it with another).

提交回复
热议问题