Class Currency
Currency.
[DataContract]
public class Currency : Equatable<Currency>, ICloneable<Currency>, ICloneable, IEquatable<Currency>, IComparable<Currency>, IComparable
- Inheritance
-
Currency
- Implements
- Inherited Members
- Extension Methods
Constructors
Currency()
public Currency()
Properties
Type
Currency type. The default is USD.
[DataMember]
public CurrencyTypes Type { get; set; }
Property Value
Value
Absolute value in CurrencyTypes.
[DataMember]
public decimal Value { get; set; }
Property Value
Methods
Clone()
Create a copy of Currency.
public override Currency Clone()
Returns
- Currency
Copy.
GetHashCode()
Get the hash code of the object Currency.
public override int GetHashCode()
Returns
- int
A hash code.
OnEquals(Currency)
Compare Currency on the equivalence.
protected override bool OnEquals(Currency other)
Parameters
other
CurrencyAnother value with which to compare.
Returns
ToString()
public override string ToString()
Returns
Operators
operator +(Currency, Currency)
Add the two objects Currency.
public static Currency operator +(Currency c1, Currency c2)
Parameters
Returns
- Currency
The result of addition.
Remarks
The values must be the same Type.
operator /(Currency, Currency)
Divide one value to another.
public static Currency operator /(Currency c1, Currency c2)
Parameters
Returns
- Currency
The result of the division.
explicit operator decimal(Currency)
[Obsolete]
public static explicit operator decimal(Currency value)
Parameters
Returns
implicit operator Currency(decimal)
[Obsolete]
public static implicit operator Currency(decimal value)
Parameters
Returns
operator *(Currency, Currency)
Multiply one value to another.
public static Currency operator *(Currency c1, Currency c2)
Parameters
Returns
- Currency
The result of the multiplication.
operator -(Currency, Currency)
Subtract one value from another value.
public static Currency operator -(Currency c1, Currency c2)
Parameters
Returns
- Currency
The result of the subtraction.