Get the currency from current culture?

后端 未结 8 1362
渐次进展
渐次进展 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 05:01

    Use the RegionInfo.ISOCurrencySymbol property. For example:

      var ri = new RegionInfo(System.Threading.Thread.CurrentThread.CurrentUICulture.LCID);
      Console.WriteLine(ri.ISOCurrencySymbol);
    

    Output: "USD"

    0 讨论(0)
  • 2020-12-03 05:01
    string isoCurrencySymbol = RegionInfo.CurrentRegion.ISOCurrencySymbol;
    
    0 讨论(0)
提交回复
热议问题