Looking for a world currency enum with currency symbols in the display
Asked Answered
A

3

6

I'm looking for either an enum or something else that I can use for a drop down list that will show the currency name (Ex. United States Dollar) with its symbol (ex. $) where the value is the currency code like 'USD'

I don't want to type in 100+

something like this

enum Currency {

    [Display(Name = "United States Dollar $")]
    USD,
    [Display(Name = "Mexican Peso $")]
    MXN,
    [Display(Name = "Japanese Yen ¥")]
    JPY
}
Alagez answered 24/10, 2018 at 4:28 Comment(1)
@IronGeek, code reuse instead of code duplication, particularly in the form of a shared library, is often valued for many reasons. Sometimes it's hard to find reusable code for obscure things like this, and sometimes asking a Stack Overflow participant is the key that reduces work and improves software for everyone else that has a similar question for years to come.Groom
L
5

Base on Daniele Viti's response, I have added EnumMember Attribute and StringEnumConverter. Hope this helps.

/// <summary>
/// Enumeration of ISO 4217 currency codes, indexed with their respective ISO 4217 numeric currency codes. 
/// Only codes support in .Net with RegionInfo objects are listed
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum CurrencyCode
{
    [EnumMember(Value = "AED")] [Description("United Arab Emirates dirham")]
    AED = 784,

    [EnumMember(Value = "AFN")] [Description("Afghan afghani")]
    AFN = 971,

    [EnumMember(Value = "ALL")] [Description("Albanian lek")]
    ALL = 8,

    [EnumMember(Value = "AMD")] [Description("Armenian dram")]
    AMD = 51,

    [EnumMember(Value = "ANG")] [Description("Netherlands Antillean guilder")]
    ANG = 532,

    [EnumMember(Value = "AOA")] [Description("Angolan kwanza")]
    AOA = 973,

    [EnumMember(Value = "ARS")] [Description("Argentine peso")]
    ARS = 32,

    [EnumMember(Value = "AUD")] [Description("Australian dollar")]
    AUD = 36,

    [EnumMember(Value = "AWG")] [Description("Aruban florin")]
    AWG = 533,

    [EnumMember(Value = "AZN")] [Description("Azerbaijani manat")]
    AZN = 944,

    [EnumMember(Value = "BAM")] [Description("Bosnia and Herzegovina convertible mark")]
    BAM = 977,

    [EnumMember(Value = "BBD")] [Description("Barbados dollar")]
    BBD = 52,

    [EnumMember(Value = "BDT")] [Description("Bangladeshi taka")]
    BDT = 50,

    [EnumMember(Value = "BGN")] [Description("Bulgarian lev")]
    BGN = 975,

    [EnumMember(Value = "BHD")] [Description("Bahraini dinar")]
    BHD = 48,

    [EnumMember(Value = "BIF")] [Description("Burundian franc")]
    BIF = 108,

    [EnumMember(Value = "BMD")] [Description("Bermudian dollar")]
    BMD = 60,

    [EnumMember(Value = "BND")] [Description("Brunei dollar")]
    BND = 96,

    [EnumMember(Value = "BOB")] [Description("Boliviano")]
    BOB = 68,

    [EnumMember(Value = "BOV")] [Description("Bolivian Mvdol (funds code)")]
    BOV = 984,

    [EnumMember(Value = "BRL")] [Description("Brazilian real")]
    BRL = 986,

    [EnumMember(Value = "BSD")] [Description("Bahamian dollar")]
    BSD = 44,

    [EnumMember(Value = "BTN")] [Description("Bhutanese ngultrum")]
    BTN = 64,

    [EnumMember(Value = "BWP")] [Description("Botswana pula")]
    BWP = 72,

    [EnumMember(Value = "BYN")] [Description("Belarusian ruble")]
    BYN = 933,

    [EnumMember(Value = "BZD")] [Description("Belize dollar")]
    BZD = 84,

    [EnumMember(Value = "CAD")] [Description("Canadian dollar")]
    CAD = 124,

    [EnumMember(Value = "CDF")] [Description("Congolese franc")]
    CDF = 976,

    [EnumMember(Value = "CHE")] [Description("WIR euro (complementary currency)")]
    CHE = 947,

    [EnumMember(Value = "CHF")] [Description("Swiss franc")]
    CHF = 756,

    [EnumMember(Value = "CHW")] [Description("WIR franc (complementary currency)")]
    CHW = 948,

    [EnumMember(Value = "CLF")] [Description("Unidad de Fomento (funds code)")]
    CLF = 990,

    [EnumMember(Value = "CLP")] [Description("Chilean peso")]
    CLP = 152,

    [EnumMember(Value = "COP")] [Description("Colombian peso")]
    COP = 170,

    [EnumMember(Value = "COU")] [Description("Unidad de Valor Real (UVR) (funds code)")]
    COU = 970,

    [EnumMember(Value = "CRC")] [Description("Costa Rican colon")]
    CRC = 188,

    [EnumMember(Value = "CUC")] [Description("Cuban convertible peso")]
    CUC = 931,

    [EnumMember(Value = "CUP")] [Description("Cuban peso")]
    CUP = 192,

    [EnumMember(Value = "CVE")] [Description("Cape Verdean escudo")]
    CVE = 132,

    [EnumMember(Value = "CZK")] [Description("Czech koruna")]
    CZK = 203,

    [EnumMember(Value = "DJF")] [Description("Djiboutian franc")]
    DJF = 262,

    [EnumMember(Value = "DKK")] [Description("Danish krone")]
    DKK = 208,

    [EnumMember(Value = "DOP")] [Description("Dominican peso")]
    DOP = 214,

    [EnumMember(Value = "DZD")] [Description("Algerian dinar")]
    DZD = 12,

    [EnumMember(Value = "EGP")] [Description("Egyptian pound")]
    EGP = 818,

    [EnumMember(Value = "ERN")] [Description("Eritrean nakfa")]
    ERN = 232,

    [EnumMember(Value = "ETB")] [Description("Ethiopian birr")]
    ETB = 230,

    [EnumMember(Value = "EUR")] [Description("Euro")]
    EUR = 978,

    [EnumMember(Value = "FJD")] [Description("Fiji dollar")]
    FJD = 242,

    [EnumMember(Value = "FKP")] [Description("Falkland Islands pound")]
    FKP = 238,

    [EnumMember(Value = "GBP")] [Description("Pound sterling")]
    GBP = 826,

    [EnumMember(Value = "GEL")] [Description("Georgian lari")]
    GEL = 981,

    [EnumMember(Value = "GHS")] [Description("Ghanaian cedi")]
    GHS = 936,

    [EnumMember(Value = "GIP")] [Description("Gibraltar pound")]
    GIP = 292,

    [EnumMember(Value = "GMD")] [Description("Gambian dalasi")]
    GMD = 270,

    [EnumMember(Value = "GNF")] [Description("Guinean franc")]
    GNF = 324,

    [EnumMember(Value = "GTQ")] [Description("Guatemalan quetzal")]
    GTQ = 320,

    [EnumMember(Value = "GYD")] [Description("Guyanese dollar")]
    GYD = 328,

    [EnumMember(Value = "HKD")] [Description("Hong Kong dollar")]
    HKD = 344,

    [EnumMember(Value = "HNL")] [Description("Honduran lempira")]
    HNL = 340,

    [EnumMember(Value = "HRK")] [Description("Croatian kuna")]
    HRK = 191,

    [EnumMember(Value = "HTG")] [Description("Haitian gourde")]
    HTG = 332,

    [EnumMember(Value = "HUF")] [Description("Hungarian forint")]
    HUF = 348,

    [EnumMember(Value = "IDR")] [Description("Indonesian rupiah")]
    IDR = 360,

    [EnumMember(Value = "ILS")] [Description("Israeli new shekel")]
    ILS = 376,

    [EnumMember(Value = "INR")] [Description("Indian rupee")]
    INR = 356,

    [EnumMember(Value = "IQD")] [Description("Iraqi dinar")]
    IQD = 368,

    [EnumMember(Value = "IRR")] [Description("Iranian rial")]
    IRR = 364,

    [EnumMember(Value = "ISK")] [Description("Icelandic króna (plural: krónur)")]
    ISK = 352,

    [EnumMember(Value = "JMD")] [Description("Jamaican dollar")]
    JMD = 388,

    [EnumMember(Value = "JOD")] [Description("Jordanian dinar")]
    JOD = 400,

    [EnumMember(Value = "JPY")] [Description("Japanese yen")]
    JPY = 392,

    [EnumMember(Value = "KES")] [Description("Kenyan shilling")]
    KES = 404,

    [EnumMember(Value = "KGS")] [Description("Kyrgyzstani som")]
    KGS = 417,

    [EnumMember(Value = "KHR")] [Description("Cambodian riel")]
    KHR = 116,

    [EnumMember(Value = "KMF")] [Description("Comoro franc")]
    KMF = 174,

    [EnumMember(Value = "KPW")] [Description("North Korean won")]
    KPW = 408,

    [EnumMember(Value = "KRW")] [Description("South Korean won")]
    KRW = 410,

    [EnumMember(Value = "KWD")] [Description("Kuwaiti dinar")]
    KWD = 414,

    [EnumMember(Value = "KYD")] [Description("Cayman Islands dollar")]
    KYD = 136,

    [EnumMember(Value = "KZT")] [Description("Kazakhstani tenge")]
    KZT = 398,

    [EnumMember(Value = "LAK")] [Description("Lao kip")]
    LAK = 418,

    [EnumMember(Value = "LBP")] [Description("Lebanese pound")]
    LBP = 422,

    [EnumMember(Value = "LKR")] [Description("Sri Lankan rupee")]
    LKR = 144,

    [EnumMember(Value = "LRD")] [Description("Liberian dollar")]
    LRD = 430,

    [EnumMember(Value = "LSL")] [Description("Lesotho loti")]
    LSL = 426,

    [EnumMember(Value = "LYD")] [Description("Libyan dinar")]
    LYD = 434,

    [EnumMember(Value = "MAD")] [Description("Moroccan dirham")]
    MAD = 504,

    [EnumMember(Value = "MDL")] [Description("Moldovan leu")]
    MDL = 498,

    [EnumMember(Value = "MGA")] [Description("Malagasy ariary")]
    MGA = 969,

    [EnumMember(Value = "MKD")] [Description("Macedonian denar")]
    MKD = 807,

    [EnumMember(Value = "MMK")] [Description("Myanmar kyat")]
    MMK = 104,

    [EnumMember(Value = "MNT")] [Description("Mongolian tögrög")]
    MNT = 496,

    [EnumMember(Value = "MOP")] [Description("Macanese pataca")]
    MOP = 446,

    [EnumMember(Value = "MRU")] [Description("Mauritanian ouguiya")]
    MRU = 929,

    [EnumMember(Value = "MUR")] [Description("Mauritian rupee")]
    MUR = 480,

    [EnumMember(Value = "MVR")] [Description("Maldivian rufiyaa")]
    MVR = 462,

    [EnumMember(Value = "MWK")] [Description("Malawian kwacha")]
    MWK = 454,

    [EnumMember(Value = "MXN")] [Description("Mexican peso")]
    MXN = 484,

    [EnumMember(Value = "MXV")] [Description("Mexican Unidad de Inversion (UDI) (funds code)")]
    MXV = 979,

    [EnumMember(Value = "MYR")] [Description("Malaysian ringgit")]
    MYR = 458,

    [EnumMember(Value = "MZN")] [Description("Mozambican metical")]
    MZN = 943,

    [EnumMember(Value = "NAD")] [Description("Namibian dollar")]
    NAD = 516,

    [EnumMember(Value = "NGN")] [Description("Nigerian naira")]
    NGN = 566,

    [EnumMember(Value = "NIO")] [Description("Nicaraguan córdoba")]
    NIO = 558,

    [EnumMember(Value = "NOK")] [Description("Norwegian krone")]
    NOK = 578,

    [EnumMember(Value = "NPR")] [Description("Nepalese rupee")]
    NPR = 524,

    [EnumMember(Value = "NZD")] [Description("New Zealand dollar")]
    NZD = 554,

    [EnumMember(Value = "OMR")] [Description("Omani rial")]
    OMR = 512,

    [EnumMember(Value = "PAB")] [Description("Panamanian balboa")]
    PAB = 590,

    [EnumMember(Value = "PEN")] [Description("Peruvian sol")]
    PEN = 604,

    [EnumMember(Value = "PGK")] [Description("Papua New Guinean kina")]
    PGK = 598,

    [EnumMember(Value = "PHP")] [Description("Philippine peso")]
    PHP = 608,

    [EnumMember(Value = "PKR")] [Description("Pakistani rupee")]
    PKR = 586,

    [EnumMember(Value = "PLN")] [Description("Polish złoty")]
    PLN = 985,

    [EnumMember(Value = "PYG")] [Description("Paraguayan guaraní")]
    PYG = 600,

    [EnumMember(Value = "QAR")] [Description("Qatari riyal")]
    QAR = 634,

    [EnumMember(Value = "RON")] [Description("Romanian leu")]
    RON = 946,

    [EnumMember(Value = "RSD")] [Description("Serbian dinar")]
    RSD = 941,

    [EnumMember(Value = "CNY")] [Description("Renminbi[14]")]
    CNY = 156,

    [EnumMember(Value = "RUB")] [Description("Russian ruble")]
    RUB = 643,

    [EnumMember(Value = "RWF")] [Description("Rwandan franc")]
    RWF = 646,

    [EnumMember(Value = "SAR")] [Description("Saudi riyal")]
    SAR = 682,

    [EnumMember(Value = "SBD")] [Description("Solomon Islands dollar")]
    SBD = 90,

    [EnumMember(Value = "SCR")] [Description("Seychelles rupee")]
    SCR = 690,

    [EnumMember(Value = "SDG")] [Description("Sudanese pound")]
    SDG = 938,

    [EnumMember(Value = "SEK")] [Description("Swedish krona (plural: kronor)")]
    SEK = 752,

    [EnumMember(Value = "SGD")] [Description("Singapore dollar")]
    SGD = 702,

    [EnumMember(Value = "SHP")] [Description("Saint Helena pound")]
    SHP = 654,

    [EnumMember(Value = "SLL")] [Description("Sierra Leonean leone")]
    SLL = 694,

    [EnumMember(Value = "SLE")] [Description("Sierra Leonean leone")]
    SLE = 925,

    [EnumMember(Value = "SOS")] [Description("Somali shilling")]
    SOS = 706,

    [EnumMember(Value = "SRD")] [Description("Surinamese dollar")]
    SRD = 968,

    [EnumMember(Value = "SSP")] [Description("South Sudanese pound")]
    SSP = 728,

    [EnumMember(Value = "STN")] [Description("São Tomé and Príncipe dobra")]
    STN = 930,

    [EnumMember(Value = "SVC")] [Description("Salvadoran colón")]
    SVC = 222,

    [EnumMember(Value = "SYP")] [Description("Syrian pound")]
    SYP = 760,

    [EnumMember(Value = "SZL")] [Description("Swazi lilangeni")]
    SZL = 748,

    [EnumMember(Value = "THB")] [Description("Thai baht")]
    THB = 764,

    [EnumMember(Value = "TJS")] [Description("Tajikistani somoni")]
    TJS = 972,

    [EnumMember(Value = "TMT")] [Description("Turkmenistan manat")]
    TMT = 934,

    [EnumMember(Value = "TND")] [Description("Tunisian dinar")]
    TND = 788,

    [EnumMember(Value = "TOP")] [Description("Tongan paʻanga")]
    TOP = 776,

    [EnumMember(Value = "TRY")] [Description("Turkish lira")]
    TRY = 949,

    [EnumMember(Value = "TTD")] [Description("Trinidad and Tobago dollar")]
    TTD = 780,

    [EnumMember(Value = "TWD")] [Description("New Taiwan dollar")]
    TWD = 901,

    [EnumMember(Value = "TZS")] [Description("Tanzanian shilling")]
    TZS = 834,

    [EnumMember(Value = "UAH")] [Description("Ukrainian hryvnia")]
    UAH = 980,

    [EnumMember(Value = "UGX")] [Description("Ugandan shilling")]
    UGX = 800,

    [EnumMember(Value = "USD")] [Description("United States dollar")]
    USD = 840,

    [EnumMember(Value = "USN")] [Description("United States dollar (next day) (funds code)")]
    USN = 997,

    [EnumMember(Value = "UYI")] [Description("Uruguay Peso en Unidades Indexadas (URUIURUI) (funds code)")]
    UYI = 940,

    [EnumMember(Value = "UYU")] [Description("Uruguayan peso")]
    UYU = 858,

    [EnumMember(Value = "UYW")] [Description("Unidad previsional")]
    UYW = 927,

    [EnumMember(Value = "UZS")] [Description("Uzbekistan som")]
    UZS = 860,

    [EnumMember(Value = "VED")] [Description("Venezuelan bolívar digital")]
    VED = 926,

    [EnumMember(Value = "VES")] [Description("Venezuelan bolívar soberano")]
    VES = 928,

    [EnumMember(Value = "VND")] [Description("Vietnamese đồng")]
    VND = 704,

    [EnumMember(Value = "VUV")] [Description("Vanuatu vatu")]
    VUV = 548,

    [EnumMember(Value = "WST")] [Description("Samoan tala")]
    WST = 882,

    [EnumMember(Value = "XAF")] [Description("CFA franc BEAC")]
    XAF = 950,

    [EnumMember(Value = "XAG")] [Description("Silver (one troy ounce)")]
    XAG = 961,

    [EnumMember(Value = "XAU")] [Description("Gold (one troy ounce)")]
    XAU = 959,

    [EnumMember(Value = "XBA")] [Description("European Composite Unit (EURCO) (bond market unit)")]
    XBA = 955,

    [EnumMember(Value = "XBB")] [Description("European Monetary Unit (E.M.U.-6) (bond market unit)")]
    XBB = 956,

    [EnumMember(Value = "XBC")] [Description("European Unit of Account 9 (E.U.A.-9) (bond market unit)")]
    XBC = 957,

    [EnumMember(Value = "XBD")] [Description("European Unit of Account 17 (E.U.A.-17) (bond market unit)")]
    XBD = 958,

    [EnumMember(Value = "XCD")] [Description("East Caribbean dollar")]
    XCD = 951,

    [EnumMember(Value = "XDR")] [Description("Special drawing rights")]
    XDR = 960,

    [EnumMember(Value = "XOF")] [Description("CFA franc BCEAO")]
    XOF = 952,

    [EnumMember(Value = "XPD")] [Description("Palladium (one troy ounce)")]
    XPD = 964,

    [EnumMember(Value = "XPF")] [Description("CFP franc (franc Pacifique)")]
    XPF = 953,

    [EnumMember(Value = "XPT")] [Description("Platinum (one troy ounce)")]
    XPT = 962,

    [EnumMember(Value = "XSU")] [Description("SUCRE")]
    XSU = 994,

    [EnumMember(Value = "XTS")] [Description("Code reserved for testing")]
    XTS = 963,

    [EnumMember(Value = "XUA")] [Description("ADB Unit of Account")]
    XUA = 965,

    [EnumMember(Value = "XXX")] [Description("No currency")]
    XXX = 999,

    [EnumMember(Value = "YER")] [Description("Yemeni rial")]
    YER = 886,

    [EnumMember(Value = "ZAR")] [Description("South African rand")]
    ZAR = 710,

    [EnumMember(Value = "ZMW")] [Description("Zambian kwacha")]
    ZMW = 967,

    [EnumMember(Value = "ZWL")] [Description("Zimbabwean dollar")]
    ZWL = 932
}
Loath answered 2/9, 2022 at 3:50 Comment(0)
M
3

Not identical but similar (data from wikipedia)

using System.ComponentModel;
/// <summary>
/// Enumeration of ISO 4217 currency codes, indexed with their respective ISO 4217 numeric currency codes. 
/// Only codes support in .Net with RegionInfo objects are listed
/// </summary>
public enum CurrencyCodes
{
    [Description("AED - United Arab Emirates dirham")] AED = 784,
    [Description("AFN - Afghan afghani")] AFN = 971,
    [Description("ALL - Albanian lek")] ALL = 8,
    [Description("AMD - Armenian dram")] AMD = 51,
    [Description("ANG - Netherlands Antillean guilder")] ANG = 532,
    [Description("AOA - Angolan kwanza")] AOA = 973,
    [Description("ARS - Argentine peso")] ARS = 32,
    [Description("AUD - Australian dollar")] AUD = 36,
    [Description("AWG - Aruban florin")] AWG = 533,
    [Description("AZN - Azerbaijani manat")] AZN = 944,
    [Description("BAM - Bosnia and Herzegovina convertible mark")] BAM = 977,
    [Description("BBD - Barbados dollar")] BBD = 52,
    [Description("BDT - Bangladeshi taka")] BDT = 50,
    [Description("BGN - Bulgarian lev")] BGN = 975,
    [Description("BHD - Bahraini dinar")] BHD = 48,
    [Description("BIF - Burundian franc")] BIF = 108,
    [Description("BMD - Bermudian dollar")] BMD = 60,
    [Description("BND - Brunei dollar")] BND = 96,
    [Description("BOB - Boliviano")] BOB = 68,
    [Description("BOV - Bolivian Mvdol (funds code)")] BOV = 984,
    [Description("BRL - Brazilian real")] BRL = 986,
    [Description("BSD - Bahamian dollar")] BSD = 44,
    [Description("BTN - Bhutanese ngultrum")] BTN = 64,
    [Description("BWP - Botswana pula")] BWP = 72,
    [Description("BYN - Belarusian ruble")] BYN = 933,
    [Description("BZD - Belize dollar")] BZD = 84,
    [Description("CAD - Canadian dollar")] CAD = 124,
    [Description("CDF - Congolese franc")] CDF = 976,
    [Description("CHE - WIR euro (complementary currency)")] CHE = 947,
    [Description("CHF - Swiss franc")] CHF = 756,
    [Description("CHW - WIR franc (complementary currency)")] CHW = 948,
    [Description("CLF - Unidad de Fomento (funds code)")] CLF = 990,
    [Description("CLP - Chilean peso")] CLP = 152,
    [Description("COP - Colombian peso")] COP = 170,
    [Description("COU - Unidad de Valor Real (UVR) (funds code)")] COU = 970,
    [Description("CRC - Costa Rican colon")] CRC = 188,
    [Description("CUC - Cuban convertible peso")] CUC = 931,
    [Description("CUP - Cuban peso")] CUP = 192,
    [Description("CVE - Cape Verdean escudo")] CVE = 132,
    [Description("CZK - Czech koruna")] CZK = 203,
    [Description("DJF - Djiboutian franc")] DJF = 262,
    [Description("DKK - Danish krone")] DKK = 208,
    [Description("DOP - Dominican peso")] DOP = 214,
    [Description("DZD - Algerian dinar")] DZD = 12,
    [Description("EGP - Egyptian pound")] EGP = 818,
    [Description("ERN - Eritrean nakfa")] ERN = 232,
    [Description("ETB - Ethiopian birr")] ETB = 230,
    [Description("EUR - Euro")] EUR = 978,
    [Description("FJD - Fiji dollar")] FJD = 242,
    [Description("FKP - Falkland Islands pound")] FKP = 238,
    [Description("GBP - Pound sterling")] GBP = 826,
    [Description("GEL - Georgian lari")] GEL = 981,
    [Description("GHS - Ghanaian cedi")] GHS = 936,
    [Description("GIP - Gibraltar pound")] GIP = 292,
    [Description("GMD - Gambian dalasi")] GMD = 270,
    [Description("GNF - Guinean franc")] GNF = 324,
    [Description("GTQ - Guatemalan quetzal")] GTQ = 320,
    [Description("GYD - Guyanese dollar")] GYD = 328,
    [Description("HKD - Hong Kong dollar")] HKD = 344,
    [Description("HNL - Honduran lempira")] HNL = 340,
    [Description("HRK - Croatian kuna")] HRK = 191,
    [Description("HTG - Haitian gourde")] HTG = 332,
    [Description("HUF - Hungarian forint")] HUF = 348,
    [Description("IDR - Indonesian rupiah")] IDR = 360,
    [Description("ILS - Israeli new shekel")] ILS = 376,
    [Description("INR - Indian rupee")] INR = 356,
    [Description("IQD - Iraqi dinar")] IQD = 368,
    [Description("IRR - Iranian rial")] IRR = 364,
    [Description("ISK - Icelandic króna (plural: krónur)")] ISK = 352,
    [Description("JMD - Jamaican dollar")] JMD = 388,
    [Description("JOD - Jordanian dinar")] JOD = 400,
    [Description("JPY - Japanese yen")] JPY = 392,
    [Description("KES - Kenyan shilling")] KES = 404,
    [Description("KGS - Kyrgyzstani som")] KGS = 417,
    [Description("KHR - Cambodian riel")] KHR = 116,
    [Description("KMF - Comoro franc")] KMF = 174,
    [Description("KPW - North Korean won")] KPW = 408,
    [Description("KRW - South Korean won")] KRW = 410,
    [Description("KWD - Kuwaiti dinar")] KWD = 414,
    [Description("KYD - Cayman Islands dollar")] KYD = 136,
    [Description("KZT - Kazakhstani tenge")] KZT = 398,
    [Description("LAK - Lao kip")] LAK = 418,
    [Description("LBP - Lebanese pound")] LBP = 422,
    [Description("LKR - Sri Lankan rupee")] LKR = 144,
    [Description("LRD - Liberian dollar")] LRD = 430,
    [Description("LSL - Lesotho loti")] LSL = 426,
    [Description("LYD - Libyan dinar")] LYD = 434,
    [Description("MAD - Moroccan dirham")] MAD = 504,
    [Description("MDL - Moldovan leu")] MDL = 498,
    [Description("MGA - Malagasy ariary")] MGA = 969,
    [Description("MKD - Macedonian denar")] MKD = 807,
    [Description("MMK - Myanmar kyat")] MMK = 104,
    [Description("MNT - Mongolian tögrög")] MNT = 496,
    [Description("MOP - Macanese pataca")] MOP = 446,
    [Description("MRU - Mauritanian ouguiya")] MRU = 929,
    [Description("MUR - Mauritian rupee")] MUR = 480,
    [Description("MVR - Maldivian rufiyaa")] MVR = 462,
    [Description("MWK - Malawian kwacha")] MWK = 454,
    [Description("MXN - Mexican peso")] MXN = 484,
    [Description("MXV - Mexican Unidad de Inversion (UDI) (funds code)")] MXV = 979,
    [Description("MYR - Malaysian ringgit")] MYR = 458,
    [Description("MZN - Mozambican metical")] MZN = 943,
    [Description("NAD - Namibian dollar")] NAD = 516,
    [Description("NGN - Nigerian naira")] NGN = 566,
    [Description("NIO - Nicaraguan córdoba")] NIO = 558,
    [Description("NOK - Norwegian krone")] NOK = 578,
    [Description("NPR - Nepalese rupee")] NPR = 524,
    [Description("NZD - New Zealand dollar")] NZD = 554,
    [Description("OMR - Omani rial")] OMR = 512,
    [Description("PAB - Panamanian balboa")] PAB = 590,
    [Description("PEN - Peruvian sol")] PEN = 604,
    [Description("PGK - Papua New Guinean kina")] PGK = 598,
    [Description("PHP - Philippine peso")] PHP = 608,
    [Description("PKR - Pakistani rupee")] PKR = 586,
    [Description("PLN - Polish złoty")] PLN = 985,
    [Description("PYG - Paraguayan guaraní")] PYG = 600,
    [Description("QAR - Qatari riyal")] QAR = 634,
    [Description("RON - Romanian leu")] RON = 946,
    [Description("RSD - Serbian dinar")] RSD = 941,
    [Description("CNY - Renminbi[14]")] CNY = 156,
    [Description("RUB - Russian ruble")] RUB = 643,
    [Description("RWF - Rwandan franc")] RWF = 646,
    [Description("SAR - Saudi riyal")] SAR = 682,
    [Description("SBD - Solomon Islands dollar")] SBD = 90,
    [Description("SCR - Seychelles rupee")] SCR = 690,
    [Description("SDG - Sudanese pound")] SDG = 938,
    [Description("SEK - Swedish krona (plural: kronor)")] SEK = 752,
    [Description("SGD - Singapore dollar")] SGD = 702,
    [Description("SHP - Saint Helena pound")] SHP = 654,
    [Description("SLL - Sierra Leonean leone")] SLL = 694,
    [Description("SLE - Sierra Leonean leone")] SLE = 925,
    [Description("SOS - Somali shilling")] SOS = 706,
    [Description("SRD - Surinamese dollar")] SRD = 968,
    [Description("SSP - South Sudanese pound")] SSP = 728,
    [Description("STN - São Tomé and Príncipe dobra")] STN = 930,
    [Description("SVC - Salvadoran colón")] SVC = 222,
    [Description("SYP - Syrian pound")] SYP = 760,
    [Description("SZL - Swazi lilangeni")] SZL = 748,
    [Description("THB - Thai baht")] THB = 764,
    [Description("TJS - Tajikistani somoni")] TJS = 972,
    [Description("TMT - Turkmenistan manat")] TMT = 934,
    [Description("TND - Tunisian dinar")] TND = 788,
    [Description("TOP - Tongan paʻanga")] TOP = 776,
    [Description("TRY - Turkish lira")] TRY = 949,
    [Description("TTD - Trinidad and Tobago dollar")] TTD = 780,
    [Description("TWD - New Taiwan dollar")] TWD = 901,
    [Description("TZS - Tanzanian shilling")] TZS = 834,
    [Description("UAH - Ukrainian hryvnia")] UAH = 980,
    [Description("UGX - Ugandan shilling")] UGX = 800,
    [Description("USD - United States dollar")] USD = 840,
    [Description("USN - United States dollar (next day) (funds code)")] USN = 997,
    [Description("UYI - Uruguay Peso en Unidades Indexadas (URUIURUI) (funds code)")] UYI = 940,
    [Description("UYU - Uruguayan peso")] UYU = 858,
    [Description("UYW - Unidad previsional")] UYW = 927,
    [Description("UZS - Uzbekistan som")] UZS = 860,
    [Description("VED - Venezuelan bolívar digital")] VED = 926,
    [Description("VES - Venezuelan bolívar soberano")] VES = 928,
    [Description("VND - Vietnamese đồng")] VND = 704,
    [Description("VUV - Vanuatu vatu")] VUV = 548,
    [Description("WST - Samoan tala")] WST = 882,
    [Description("XAF - CFA franc BEAC")] XAF = 950,
    [Description("XAG - Silver (one troy ounce)")] XAG = 961,
    [Description("XAU - Gold (one troy ounce)")] XAU = 959,
    [Description("XBA - European Composite Unit (EURCO) (bond market unit)")] XBA = 955,
    [Description("XBB - European Monetary Unit (E.M.U.-6) (bond market unit)")] XBB = 956,
    [Description("XBC - European Unit of Account 9 (E.U.A.-9) (bond market unit)")] XBC = 957,
    [Description("XBD - European Unit of Account 17 (E.U.A.-17) (bond market unit)")] XBD = 958,
    [Description("XCD - East Caribbean dollar")] XCD = 951,
    [Description("XDR - Special drawing rights")] XDR = 960,
    [Description("XOF - CFA franc BCEAO")] XOF = 952,
    [Description("XPD - Palladium (one troy ounce)")] XPD = 964,
    [Description("XPF - CFP franc (franc Pacifique)")] XPF = 953,
    [Description("XPT - Platinum (one troy ounce)")] XPT = 962,
    [Description("XSU - SUCRE")] XSU = 994,
    [Description("XTS - Code reserved for testing")] XTS = 963,
    [Description("XUA - ADB Unit of Account")] XUA = 965,
    [Description("XXX - No currency")] XXX = 999,
    [Description("YER - Yemeni rial")] YER = 886,
    [Description("ZAR - South African rand")] ZAR = 710,
    [Description("ZMW - Zambian kwacha")] ZMW = 967,
    [Description("ZWL - Zimbabwean dollar")] ZWL = 932,
}
Meakem answered 5/8, 2022 at 10:43 Comment(0)
M
1

This will give you a list of all available currencies:

HashSet<string> hashSet = new HashSet<string>();
foreach (CultureInfo item in CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures))
    hashSet.Add(item.NumberFormat.CurrencySymbol);

foreach (string currency in hashSet)
    Console.WriteLine(currency);
Mesopause answered 24/10, 2018 at 5:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.