Class Currency
- Namespace
- Glitch9
[Serializable]
public class Currency : IComparable
- Inheritance
-
Currency
- Implements
- Inherited Members
- Extension Methods
Constructors
Currency()
public Currency()
Currency(double, CurrencyCode, bool)
public Currency(double priceInUsd, CurrencyCode currencyCode = CurrencyCode.USD, bool isEstimate = false)
Parameters
priceInUsd
doublecurrencyCode
CurrencyCodeisEstimate
bool
Properties
CurrencyCode
public CurrencyCode CurrencyCode { get; set; }
Property Value
IsEstimate
public bool IsEstimate { get; set; }
Property Value
PriceInUsd
public double PriceInUsd { get; set; }
Property Value
Value
public double Value { get; set; }
Property Value
Methods
CompareTo(object)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(object obj)
Parameters
obj
objectAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes obj
in the sort order.Zero This instance occurs in the same position in the sort order as obj
.Greater than zero This instance follows obj
in the sort order.
Exceptions
- ArgumentException
obj
is not the same type as this instance.
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
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString(CurrencyCode, string)
public string ToString(CurrencyCode code, string arg = null)
Parameters
code
CurrencyCodearg
string
Returns
ToString(string)
public string ToString(string arg = null)
Parameters
arg
string
Returns
Operators
operator +(Currency, Currency)
public static Currency operator +(Currency a, Currency b)
Parameters
Returns
operator +(Currency, decimal)
public static Currency operator +(Currency a, decimal b)
Parameters
Returns
operator +(Currency, double)
public static Currency operator +(Currency a, double b)
Parameters
Returns
operator +(Currency, int)
public static Currency operator +(Currency a, int b)
Parameters
Returns
operator +(Currency, float)
public static Currency operator +(Currency a, float b)
Parameters
Returns
operator +(decimal, Currency)
public static Currency operator +(decimal a, Currency b)
Parameters
Returns
operator +(double, Currency)
public static Currency operator +(double a, Currency b)
Parameters
Returns
operator +(int, Currency)
public static Currency operator +(int a, Currency b)
Parameters
Returns
operator +(float, Currency)
public static Currency operator +(float a, Currency b)
Parameters
Returns
operator /(Currency, Currency)
public static Currency operator /(Currency a, Currency b)
Parameters
Returns
operator /(Currency, decimal)
public static Currency operator /(Currency a, decimal b)
Parameters
Returns
operator /(Currency, double)
public static Currency operator /(Currency a, double b)
Parameters
Returns
operator /(Currency, int)
public static Currency operator /(Currency a, int b)
Parameters
Returns
operator /(Currency, float)
public static Currency operator /(Currency a, float b)
Parameters
Returns
operator /(decimal, Currency)
public static Currency operator /(decimal a, Currency b)
Parameters
Returns
operator /(double, Currency)
public static Currency operator /(double a, Currency b)
Parameters
Returns
operator /(int, Currency)
public static Currency operator /(int a, Currency b)
Parameters
Returns
operator /(float, Currency)
public static Currency operator /(float a, Currency b)
Parameters
Returns
operator ==(Currency, Currency)
public static bool operator ==(Currency a, Currency b)
Parameters
Returns
operator ==(Currency, decimal)
public static bool operator ==(Currency a, decimal b)
Parameters
Returns
operator ==(Currency, double)
public static bool operator ==(Currency a, double b)
Parameters
Returns
operator ==(Currency, int)
public static bool operator ==(Currency a, int b)
Parameters
Returns
operator ==(Currency, float)
public static bool operator ==(Currency a, float b)
Parameters
Returns
operator ==(decimal, Currency)
public static bool operator ==(decimal a, Currency b)
Parameters
Returns
operator ==(double, Currency)
public static bool operator ==(double a, Currency b)
Parameters
Returns
operator ==(int, Currency)
public static bool operator ==(int a, Currency b)
Parameters
Returns
operator ==(float, Currency)
public static bool operator ==(float a, Currency b)
Parameters
Returns
operator >(Currency, Currency)
public static bool operator >(Currency a, Currency b)
Parameters
Returns
operator >(Currency, decimal)
public static bool operator >(Currency a, decimal b)
Parameters
Returns
operator >(Currency, double)
public static bool operator >(Currency a, double b)
Parameters
Returns
operator >(Currency, int)
public static bool operator >(Currency a, int b)
Parameters
Returns
operator >(Currency, float)
public static bool operator >(Currency a, float b)
Parameters
Returns
operator >(decimal, Currency)
public static bool operator >(decimal a, Currency b)
Parameters
Returns
operator >(double, Currency)
public static bool operator >(double a, Currency b)
Parameters
Returns
operator >(int, Currency)
public static bool operator >(int a, Currency b)
Parameters
Returns
operator >(float, Currency)
public static bool operator >(float a, Currency b)
Parameters
Returns
operator >=(Currency, Currency)
public static bool operator >=(Currency a, Currency b)
Parameters
Returns
operator >=(Currency, decimal)
public static bool operator >=(Currency a, decimal b)
Parameters
Returns
operator >=(Currency, double)
public static bool operator >=(Currency a, double b)
Parameters
Returns
operator >=(Currency, int)
public static bool operator >=(Currency a, int b)
Parameters
Returns
operator >=(Currency, float)
public static bool operator >=(Currency a, float b)
Parameters
Returns
operator >=(decimal, Currency)
public static bool operator >=(decimal a, Currency b)
Parameters
Returns
operator >=(double, Currency)
public static bool operator >=(double a, Currency b)
Parameters
Returns
operator >=(int, Currency)
public static bool operator >=(int a, Currency b)
Parameters
Returns
operator >=(float, Currency)
public static bool operator >=(float a, Currency b)
Parameters
Returns
implicit operator double(Currency)
public static implicit operator double(Currency price)
Parameters
price
Currency
Returns
implicit operator (double value, bool isEstimate)(Currency)
public static implicit operator (double value, bool isEstimate)(Currency price)
Parameters
price
Currency
Returns
implicit operator Currency(decimal)
public static implicit operator Currency(decimal value)
Parameters
value
decimal
Returns
implicit operator Currency(double)
public static implicit operator Currency(double value)
Parameters
value
double
Returns
implicit operator Currency(int)
public static implicit operator Currency(int value)
Parameters
value
int
Returns
implicit operator Currency(float)
public static implicit operator Currency(float value)
Parameters
value
float
Returns
operator !=(Currency, Currency)
public static bool operator !=(Currency a, Currency b)
Parameters
Returns
operator !=(Currency, decimal)
public static bool operator !=(Currency a, decimal b)
Parameters
Returns
operator !=(Currency, double)
public static bool operator !=(Currency a, double b)
Parameters
Returns
operator !=(Currency, int)
public static bool operator !=(Currency a, int b)
Parameters
Returns
operator !=(Currency, float)
public static bool operator !=(Currency a, float b)
Parameters
Returns
operator !=(decimal, Currency)
public static bool operator !=(decimal a, Currency b)
Parameters
Returns
operator !=(double, Currency)
public static bool operator !=(double a, Currency b)
Parameters
Returns
operator !=(int, Currency)
public static bool operator !=(int a, Currency b)
Parameters
Returns
operator !=(float, Currency)
public static bool operator !=(float a, Currency b)
Parameters
Returns
operator <(Currency, Currency)
public static bool operator <(Currency a, Currency b)
Parameters
Returns
operator <(Currency, decimal)
public static bool operator <(Currency a, decimal b)
Parameters
Returns
operator <(Currency, double)
public static bool operator <(Currency a, double b)
Parameters
Returns
operator <(Currency, int)
public static bool operator <(Currency a, int b)
Parameters
Returns
operator <(Currency, float)
public static bool operator <(Currency a, float b)
Parameters
Returns
operator <(decimal, Currency)
public static bool operator <(decimal a, Currency b)
Parameters
Returns
operator <(double, Currency)
public static bool operator <(double a, Currency b)
Parameters
Returns
operator <(int, Currency)
public static bool operator <(int a, Currency b)
Parameters
Returns
operator <(float, Currency)
public static bool operator <(float a, Currency b)
Parameters
Returns
operator <=(Currency, Currency)
public static bool operator <=(Currency a, Currency b)
Parameters
Returns
operator <=(Currency, decimal)
public static bool operator <=(Currency a, decimal b)
Parameters
Returns
operator <=(Currency, double)
public static bool operator <=(Currency a, double b)
Parameters
Returns
operator <=(Currency, int)
public static bool operator <=(Currency a, int b)
Parameters
Returns
operator <=(Currency, float)
public static bool operator <=(Currency a, float b)
Parameters
Returns
operator <=(decimal, Currency)
public static bool operator <=(decimal a, Currency b)
Parameters
Returns
operator <=(double, Currency)
public static bool operator <=(double a, Currency b)
Parameters
Returns
operator <=(int, Currency)
public static bool operator <=(int a, Currency b)
Parameters
Returns
operator <=(float, Currency)
public static bool operator <=(float a, Currency b)
Parameters
Returns
operator %(Currency, Currency)
public static Currency operator %(Currency a, Currency b)
Parameters
Returns
operator %(Currency, decimal)
public static Currency operator %(Currency a, decimal b)
Parameters
Returns
operator %(Currency, double)
public static Currency operator %(Currency a, double b)
Parameters
Returns
operator %(Currency, int)
public static Currency operator %(Currency a, int b)
Parameters
Returns
operator %(Currency, float)
public static Currency operator %(Currency a, float b)
Parameters
Returns
operator %(decimal, Currency)
public static Currency operator %(decimal a, Currency b)
Parameters
Returns
operator %(double, Currency)
public static Currency operator %(double a, Currency b)
Parameters
Returns
operator %(int, Currency)
public static Currency operator %(int a, Currency b)
Parameters
Returns
operator %(float, Currency)
public static Currency operator %(float a, Currency b)
Parameters
Returns
operator *(Currency, Currency)
public static Currency operator *(Currency a, Currency b)
Parameters
Returns
operator *(Currency, decimal)
public static Currency operator *(Currency a, decimal b)
Parameters
Returns
operator *(Currency, double)
public static Currency operator *(Currency a, double b)
Parameters
Returns
operator *(Currency, int)
public static Currency operator *(Currency a, int b)
Parameters
Returns
operator *(Currency, float)
public static Currency operator *(Currency a, float b)
Parameters
Returns
operator *(decimal, Currency)
public static Currency operator *(decimal a, Currency b)
Parameters
Returns
operator *(double, Currency)
public static Currency operator *(double a, Currency b)
Parameters
Returns
operator *(int, Currency)
public static Currency operator *(int a, Currency b)
Parameters
Returns
operator *(float, Currency)
public static Currency operator *(float a, Currency b)
Parameters
Returns
operator -(Currency, Currency)
public static Currency operator -(Currency a, Currency b)
Parameters
Returns
operator -(Currency, decimal)
public static Currency operator -(Currency a, decimal b)
Parameters
Returns
operator -(Currency, double)
public static Currency operator -(Currency a, double b)
Parameters
Returns
operator -(Currency, int)
public static Currency operator -(Currency a, int b)
Parameters
Returns
operator -(Currency, float)
public static Currency operator -(Currency a, float b)
Parameters
Returns
operator -(decimal, Currency)
public static Currency operator -(decimal a, Currency b)
Parameters
Returns
operator -(double, Currency)
public static Currency operator -(double a, Currency b)
Parameters
Returns
operator -(int, Currency)
public static Currency operator -(int a, Currency b)
Parameters
Returns
operator -(float, Currency)
public static Currency operator -(float a, Currency b)