Is there a text equivalent of CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol provided as a property in C#.
e.g. CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol would give me $ but I want something textual like USD.
You would use this:
var name = System.Globalization.RegionInfo.CurrentRegion.ISOCurrencySymbol;
If you need the currency symbol for a specific region, you would use the RegionInfo
's constructor to specify a culture. For example, to always use en-US:
var name = new System.Globalization.RegionInfo(1033).ISOCurrencySymbol;
or
var name = new System.Globalization.RegionInfo("en-US").ISOCurrencySymbol;
Take a look at the MSDN documentation for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With