C# 클래스 NContrib.International.Currency

파일 보기 프로젝트 열기: veracross/ncontrib

공개 프로퍼티들

프로퍼티 타입 설명
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