How to return currency symbol from currency code using C#

Hi guys,

Firstly let’s clarify what currency symbols and currency codes are.
Currency symbols are symbols that are used to represent a currency and it can vary from each country.
See below some currency symbols as examples:

  • € – Euro
  • £ – Pounds
  • R$ – Real

The currency code or the ISO 4217 is a international standard that sets codes of 3 characters for currencies.
See below some examples of currency codes:

  • EUR – Euro
  • GBP – Pounds
  • BRL – Real

Now let’s write a function using C# that will enable you to get a currency symbol given a currency code. This function can be very useful for you that is working with international systems.
To convert the currency code to currency symbol we will use the System.Globalization.
See the function below:

Click on this link to know more about Currency Symbol.

Click on this link to know more about System.Globalization Namespace.

Click on this link to know more about CultureInfo Class.

Click on this link to know more about the ISO 4217.

Thanks for reading.
Like and Share if you found it may be useful to someone you know!

Would you like to check the Portuguese version?
Clique on the Brazilian flag -> Brazil

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate »