Class Currency
- Namespace
- Dynamicweb.Ecommerce.International
- Assembly
- Dynamicweb.Ecommerce.dll
Represents the currency.
[Serializable]
public class Currency : ICloneable
- Inheritance
-
Currency
- Implements
- Inherited Members
Constructors
Currency()
Creates a new instance of Currency.
public Currency()
Properties
Code
Gets or sets the currency code.
public string Code { get; set; }
Property Value
CultureInfo
Gets or sets the culture information.
public string CultureInfo { get; set; }
Property Value
IsDefault
Gets or sets the value indicating whether the currency is default.
public bool IsDefault { get; set; }
Property Value
NegativePattern
Gets or sets the negative pattern for this Currency. Only used if CultureInfo is used. http://msdn.microsoft.com/en-us/library/system.globalization.numberformatinfo.currencynegativepattern(v=vs.110).aspx
public int NegativePattern { get; set; }
Property Value
PayGatewayCode
Gets or sets the code of pay gateway.
public int PayGatewayCode { get; set; }
Property Value
PositivePattern
Gets or sets the positive pattern for this Currency. Only used if CultureInfo is used. http://msdn.microsoft.com/en-us/library/system.globalization.numberformatinfo.currencypositivepattern(v=vs.110).aspx
public int PositivePattern { get; set; }
Property Value
Rate
Gets or sets the rate.
public double Rate { get; set; }
Property Value
Rounding
Gets or sets the Rounding.
public Rounding Rounding { get; set; }
Property Value
RoundingId
Gets or sets the rounding id.
public string RoundingId { get; set; }
Property Value
Symbol
Gets or sets the symbol.
public string Symbol { get; set; }
Property Value
SymbolPlace
Gets or sets the symbol place.
public int SymbolPlace { get; set; }
Property Value
Translations
Gets the translations
public TranslationCollection<CurrencyTranslation> Translations { get; }
Property Value
UseCurrencyCodeForFormat
Gets or sets a value indicating whether to use currency code for formatting prices instead of symbo, i.e. 'EUR 1000' instead of 'Ђ 1000'.
public bool UseCurrencyCodeForFormat { get; set; }
Property Value
- bool
true
if currency code should bed used for price formatting; otherwise,false
.
Methods
Clone()
Creates a new instance of a class with the same value as an existing instance.
public object Clone()
Returns
Remarks
Method performs a deep copy of all properties except the IsReadOnly property. IsReadOnly property always is set to False.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetCultureInfo()
Gets the CultureInfo related to the regional settings set on the currency.
public CultureInfo GetCultureInfo()
Returns
- CultureInfo
The
related to the regional settings set on the currency. If none is specified, it will use the culture of the current contextCultureInfo
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetName(string)
Gets the name of the currency for the given language.
public string GetName(string languageId)
Parameters
languageId
string
Returns
SetName(string, string)
Sets the name of the currency for the given language.
public void SetName(string languageId, string name)