C# Класс NContrib.International.Currency

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
BuiltInCurrencies CurrencyCollection

Открытые методы

Метод Описание
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

Описание методов

AmountToImpliedDecimal() публичный Метод

Takes an amount and converts it to an implied decimal integer.
public AmountToImpliedDecimal ( decimal amount ) : int
amount decimal
Результат int

Currency() публичный Метод

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
Результат System

FormatAmount() публичный Метод

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
Результат string

GetById() публичный статический Метод

Get a Currency object by the 3-char or 3-digit currency code
public static GetById ( string currencyId ) : Currency
currencyId string
Результат Currency

IsValidIdentifier() публичный статический Метод

Test if the given identifier is valid. Must be 3 letters or 3 numbers
public static IsValidIdentifier ( string currencyId ) : bool
currencyId string
Результат bool

ToString() публичный Метод

Returns the currency 3-character code
public ToString ( ) : string
Результат string

Описание свойств

BuiltInCurrencies публичное статическое свойство

public static CurrencyCollection BuiltInCurrencies
Результат CurrencyCollection