CurrencyCode

Field: static readonly CurrencyCode Default

Returns the default(XXX) CurrencyCode information.


Method: CurrencyCode Parse(String)

It returns the CurrencyCode object with the currency code in the ISO 4217 standard.

Parameter Name Description
currencyCodeString The currency code in the 3-digit string type. Example: USD

Error Type: ArgumentNullException (This error is thrown if the currencyCodeString value is null.)

Error Type: FormatException (This error is thrown If the currencyCodeString value is not equal to the code of any currency in the ISO 4217 standard)


Method: static List<CurrencyCode> GetAllCodes()

All currency codes in the ISO 4217 standard are returned in CurrencyCode type. See for a list of currency codes in the ISO 4217: Active Codes


Property: string Value

Returns the code of the currency in string type

    CurrencyCode.USD.Value; //returns "USD"

Property: string NumericCode

Returns the numeric code of the currency in string type

    CurrencyCode.USD.NumericCode; //returns "840"

Property: string Sign

Returns the symbol of the currency in string type

    CurrencyCode.USD.Sign; //returns "$"

Shows the code of the currency as a sign if HasSign is false.

    CurrencyCode.ZAR.DecimalDigits; //returns "ZAR"

Property: int DecimalDigits

Returns the decimal digit count of the currency in int type

    CurrencyCode.USD.DecimalDigits; //returns "2"

Property: int HasSign

Returns true if the symbol of the currency exists in the system, false otherwise


Method: string ToString()

Returns the code of the currency in string type

    CurrencyCode.USD.ToString(); //returns "USD"

Method: bool Equals(Object)

Returns true if the given object has the same value as the CurrencyCode object and the data, false otherwise.

Parameter Name Description
obj Object to be compared

Method: bool Equals(CurrencyCode)

Returns true if the given CurrencyCode object has the same value as the data, false otherwise.

Parameter Name Description
other The object of type CurrencyCode to be compared