-1

I wanted to ask if there is a clean and fast way to convert a TwoLetterIsoCode into the english name accordingly using C#?

An example:

US -> United Staates

DE -> Germany

FR -> France

etc.

Dark Side
  • 695
  • 2
  • 8
  • 18

2 Answers2

2

Try this:

var displayName = new RegionInfo(twoLettersIsoCode).EnglishName

The RegionInfo class is described in here

Juan
  • 3,675
  • 20
  • 34
1

Just found it out myself aswell :)

 private static string GetCountryName(string CountryCode)
        {
            RegionInfo RegInfo = new RegionInfo(CountryCode);
            return RegInfo.EnglishName;
        }
Dark Side
  • 695
  • 2
  • 8
  • 18