Get the currency from current culture?

后端 未结 8 1371
渐次进展
渐次进展 2020-12-03 04:25

Is there a way to get current information dynamically from the apps culture settings? Basically if the user has set the culture to US I want to know the currency is dollars

8条回答
  •  一向
    一向 (楼主)
    2020-12-03 04:52

    You can basically use CultureInfo class

    CultureInfo ci = new CultureInfo(UICulture);
    var symbol = ci.NumberFormat.CurrencySymbol;
    

提交回复
热议问题