Best Practice - Format Multiple Currencies

前端 未结 5 1425
我寻月下人不归
我寻月下人不归 2020-12-24 14:23

What is best practice for the scenario listed below?

We have an application which we would like to support multiple currencies. The software will respect the users l

5条回答
  •  既然无缘
    2020-12-24 15:16

    Rather than storing just the currency symbol, you could store the culture string for each currency code, so AUD --> en-AU

    CultureInfo ci = new CultureInfo("en-AU");
    currencyValue.ToString( "c", ci );
    

    I'm not sure how much flexibility there is in formatting available.

    Not sure if this helps:

    Formatting Numeric Data for a Specific Culture

提交回复
热议问题