C# Class NContrib.International.Currency

Afficher le fichier Open project: veracross/ncontrib

Méthodes publiques

Свойство Type Description
BuiltInCurrencies CurrencyCollection

Méthodes publiques

Méthode Description
AmountToImpliedDecimal ( decimal amount ) : int

Takes an amount and converts it to an implied decimal integer.

Currency ( string code, string numericCode, int minorUnit = 2, string englishName = null, string formatCulture = null ) : System
FormatAmount ( decimal amount, string overrideCulture = null ) : string

Formats an amount in an appropriate way for this currency's culture When no culture is available for the currency, format with invariant decimal formating plus the currency code

GetById ( string currencyId ) : Currency

Get a Currency object by the 3-char or 3-digit currency code

IsValidIdentifier ( string currencyId ) : bool

Test if the given identifier is valid. Must be 3 letters or 3 numbers

ToString ( ) : string

Returns the currency 3-character code

Method Details

AmountToImpliedDecimal() public méthode

Takes an amount and converts it to an implied decimal integer.
public AmountToImpliedDecimal ( decimal amount ) : int
amount decimal
Résultat int

Currency() public méthode

public Currency ( string code, string numericCode, int minorUnit = 2, string englishName = null, string formatCulture = null ) : System
code string
numericCode string
minorUnit int
englishName string
formatCulture string
Résultat System

FormatAmount() public méthode

Formats an amount in an appropriate way for this currency's culture When no culture is available for the currency, format with invariant decimal formating plus the currency code
public FormatAmount ( decimal amount, string overrideCulture = null ) : string
amount decimal
overrideCulture string Optional override culture formatting. For example using en-IE for formatting Euros instead of the default de-DE
Résultat string

GetById() public static méthode

Get a Currency object by the 3-char or 3-digit currency code
public static GetById ( string currencyId ) : Currency
currencyId string
Résultat Currency

IsValidIdentifier() public static méthode

Test if the given identifier is valid. Must be 3 letters or 3 numbers
public static IsValidIdentifier ( string currencyId ) : bool
currencyId string
Résultat bool

ToString() public méthode

Returns the currency 3-character code
public ToString ( ) : string
Résultat string

Property Details

BuiltInCurrencies public_oe static_oe property

public static CurrencyCollection BuiltInCurrencies
Résultat CurrencyCollection