Table of Contents

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 double
currencyCode CurrencyCode
isEstimate bool

Properties

CurrencyCode

public CurrencyCode CurrencyCode { get; set; }

Property Value

CurrencyCode

IsEstimate

public bool IsEstimate { get; set; }

Property Value

bool

PriceInUsd

public double PriceInUsd { get; set; }

Property Value

double

Value

public double Value { get; set; }

Property Value

double

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 object

An 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 object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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 CurrencyCode
arg string

Returns

string

ToString(string)

public string ToString(string arg = null)

Parameters

arg string

Returns

string

Operators

operator +(Currency, Currency)

public static Currency operator +(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

Currency

operator +(Currency, decimal)

public static Currency operator +(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

Currency

operator +(Currency, double)

public static Currency operator +(Currency a, double b)

Parameters

a Currency
b double

Returns

Currency

operator +(Currency, int)

public static Currency operator +(Currency a, int b)

Parameters

a Currency
b int

Returns

Currency

operator +(Currency, float)

public static Currency operator +(Currency a, float b)

Parameters

a Currency
b float

Returns

Currency

operator +(decimal, Currency)

public static Currency operator +(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

Currency

operator +(double, Currency)

public static Currency operator +(double a, Currency b)

Parameters

a double
b Currency

Returns

Currency

operator +(int, Currency)

public static Currency operator +(int a, Currency b)

Parameters

a int
b Currency

Returns

Currency

operator +(float, Currency)

public static Currency operator +(float a, Currency b)

Parameters

a float
b Currency

Returns

Currency

operator /(Currency, Currency)

public static Currency operator /(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

Currency

operator /(Currency, decimal)

public static Currency operator /(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

Currency

operator /(Currency, double)

public static Currency operator /(Currency a, double b)

Parameters

a Currency
b double

Returns

Currency

operator /(Currency, int)

public static Currency operator /(Currency a, int b)

Parameters

a Currency
b int

Returns

Currency

operator /(Currency, float)

public static Currency operator /(Currency a, float b)

Parameters

a Currency
b float

Returns

Currency

operator /(decimal, Currency)

public static Currency operator /(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

Currency

operator /(double, Currency)

public static Currency operator /(double a, Currency b)

Parameters

a double
b Currency

Returns

Currency

operator /(int, Currency)

public static Currency operator /(int a, Currency b)

Parameters

a int
b Currency

Returns

Currency

operator /(float, Currency)

public static Currency operator /(float a, Currency b)

Parameters

a float
b Currency

Returns

Currency

operator ==(Currency, Currency)

public static bool operator ==(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

bool

operator ==(Currency, decimal)

public static bool operator ==(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

bool

operator ==(Currency, double)

public static bool operator ==(Currency a, double b)

Parameters

a Currency
b double

Returns

bool

operator ==(Currency, int)

public static bool operator ==(Currency a, int b)

Parameters

a Currency
b int

Returns

bool

operator ==(Currency, float)

public static bool operator ==(Currency a, float b)

Parameters

a Currency
b float

Returns

bool

operator ==(decimal, Currency)

public static bool operator ==(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

bool

operator ==(double, Currency)

public static bool operator ==(double a, Currency b)

Parameters

a double
b Currency

Returns

bool

operator ==(int, Currency)

public static bool operator ==(int a, Currency b)

Parameters

a int
b Currency

Returns

bool

operator ==(float, Currency)

public static bool operator ==(float a, Currency b)

Parameters

a float
b Currency

Returns

bool

operator >(Currency, Currency)

public static bool operator >(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

bool

operator >(Currency, decimal)

public static bool operator >(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

bool

operator >(Currency, double)

public static bool operator >(Currency a, double b)

Parameters

a Currency
b double

Returns

bool

operator >(Currency, int)

public static bool operator >(Currency a, int b)

Parameters

a Currency
b int

Returns

bool

operator >(Currency, float)

public static bool operator >(Currency a, float b)

Parameters

a Currency
b float

Returns

bool

operator >(decimal, Currency)

public static bool operator >(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

bool

operator >(double, Currency)

public static bool operator >(double a, Currency b)

Parameters

a double
b Currency

Returns

bool

operator >(int, Currency)

public static bool operator >(int a, Currency b)

Parameters

a int
b Currency

Returns

bool

operator >(float, Currency)

public static bool operator >(float a, Currency b)

Parameters

a float
b Currency

Returns

bool

operator >=(Currency, Currency)

public static bool operator >=(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

bool

operator >=(Currency, decimal)

public static bool operator >=(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

bool

operator >=(Currency, double)

public static bool operator >=(Currency a, double b)

Parameters

a Currency
b double

Returns

bool

operator >=(Currency, int)

public static bool operator >=(Currency a, int b)

Parameters

a Currency
b int

Returns

bool

operator >=(Currency, float)

public static bool operator >=(Currency a, float b)

Parameters

a Currency
b float

Returns

bool

operator >=(decimal, Currency)

public static bool operator >=(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

bool

operator >=(double, Currency)

public static bool operator >=(double a, Currency b)

Parameters

a double
b Currency

Returns

bool

operator >=(int, Currency)

public static bool operator >=(int a, Currency b)

Parameters

a int
b Currency

Returns

bool

operator >=(float, Currency)

public static bool operator >=(float a, Currency b)

Parameters

a float
b Currency

Returns

bool

implicit operator double(Currency)

public static implicit operator double(Currency price)

Parameters

price Currency

Returns

double

implicit operator (double value, bool isEstimate)(Currency)

public static implicit operator (double value, bool isEstimate)(Currency price)

Parameters

price Currency

Returns

(double value, bool isEstimate)

implicit operator Currency(decimal)

public static implicit operator Currency(decimal value)

Parameters

value decimal

Returns

Currency

implicit operator Currency(double)

public static implicit operator Currency(double value)

Parameters

value double

Returns

Currency

implicit operator Currency(int)

public static implicit operator Currency(int value)

Parameters

value int

Returns

Currency

implicit operator Currency(float)

public static implicit operator Currency(float value)

Parameters

value float

Returns

Currency

operator !=(Currency, Currency)

public static bool operator !=(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

bool

operator !=(Currency, decimal)

public static bool operator !=(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

bool

operator !=(Currency, double)

public static bool operator !=(Currency a, double b)

Parameters

a Currency
b double

Returns

bool

operator !=(Currency, int)

public static bool operator !=(Currency a, int b)

Parameters

a Currency
b int

Returns

bool

operator !=(Currency, float)

public static bool operator !=(Currency a, float b)

Parameters

a Currency
b float

Returns

bool

operator !=(decimal, Currency)

public static bool operator !=(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

bool

operator !=(double, Currency)

public static bool operator !=(double a, Currency b)

Parameters

a double
b Currency

Returns

bool

operator !=(int, Currency)

public static bool operator !=(int a, Currency b)

Parameters

a int
b Currency

Returns

bool

operator !=(float, Currency)

public static bool operator !=(float a, Currency b)

Parameters

a float
b Currency

Returns

bool

operator <(Currency, Currency)

public static bool operator <(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

bool

operator <(Currency, decimal)

public static bool operator <(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

bool

operator <(Currency, double)

public static bool operator <(Currency a, double b)

Parameters

a Currency
b double

Returns

bool

operator <(Currency, int)

public static bool operator <(Currency a, int b)

Parameters

a Currency
b int

Returns

bool

operator <(Currency, float)

public static bool operator <(Currency a, float b)

Parameters

a Currency
b float

Returns

bool

operator <(decimal, Currency)

public static bool operator <(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

bool

operator <(double, Currency)

public static bool operator <(double a, Currency b)

Parameters

a double
b Currency

Returns

bool

operator <(int, Currency)

public static bool operator <(int a, Currency b)

Parameters

a int
b Currency

Returns

bool

operator <(float, Currency)

public static bool operator <(float a, Currency b)

Parameters

a float
b Currency

Returns

bool

operator <=(Currency, Currency)

public static bool operator <=(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

bool

operator <=(Currency, decimal)

public static bool operator <=(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

bool

operator <=(Currency, double)

public static bool operator <=(Currency a, double b)

Parameters

a Currency
b double

Returns

bool

operator <=(Currency, int)

public static bool operator <=(Currency a, int b)

Parameters

a Currency
b int

Returns

bool

operator <=(Currency, float)

public static bool operator <=(Currency a, float b)

Parameters

a Currency
b float

Returns

bool

operator <=(decimal, Currency)

public static bool operator <=(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

bool

operator <=(double, Currency)

public static bool operator <=(double a, Currency b)

Parameters

a double
b Currency

Returns

bool

operator <=(int, Currency)

public static bool operator <=(int a, Currency b)

Parameters

a int
b Currency

Returns

bool

operator <=(float, Currency)

public static bool operator <=(float a, Currency b)

Parameters

a float
b Currency

Returns

bool

operator %(Currency, Currency)

public static Currency operator %(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

Currency

operator %(Currency, decimal)

public static Currency operator %(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

Currency

operator %(Currency, double)

public static Currency operator %(Currency a, double b)

Parameters

a Currency
b double

Returns

Currency

operator %(Currency, int)

public static Currency operator %(Currency a, int b)

Parameters

a Currency
b int

Returns

Currency

operator %(Currency, float)

public static Currency operator %(Currency a, float b)

Parameters

a Currency
b float

Returns

Currency

operator %(decimal, Currency)

public static Currency operator %(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

Currency

operator %(double, Currency)

public static Currency operator %(double a, Currency b)

Parameters

a double
b Currency

Returns

Currency

operator %(int, Currency)

public static Currency operator %(int a, Currency b)

Parameters

a int
b Currency

Returns

Currency

operator %(float, Currency)

public static Currency operator %(float a, Currency b)

Parameters

a float
b Currency

Returns

Currency

operator *(Currency, Currency)

public static Currency operator *(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

Currency

operator *(Currency, decimal)

public static Currency operator *(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

Currency

operator *(Currency, double)

public static Currency operator *(Currency a, double b)

Parameters

a Currency
b double

Returns

Currency

operator *(Currency, int)

public static Currency operator *(Currency a, int b)

Parameters

a Currency
b int

Returns

Currency

operator *(Currency, float)

public static Currency operator *(Currency a, float b)

Parameters

a Currency
b float

Returns

Currency

operator *(decimal, Currency)

public static Currency operator *(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

Currency

operator *(double, Currency)

public static Currency operator *(double a, Currency b)

Parameters

a double
b Currency

Returns

Currency

operator *(int, Currency)

public static Currency operator *(int a, Currency b)

Parameters

a int
b Currency

Returns

Currency

operator *(float, Currency)

public static Currency operator *(float a, Currency b)

Parameters

a float
b Currency

Returns

Currency

operator -(Currency, Currency)

public static Currency operator -(Currency a, Currency b)

Parameters

a Currency
b Currency

Returns

Currency

operator -(Currency, decimal)

public static Currency operator -(Currency a, decimal b)

Parameters

a Currency
b decimal

Returns

Currency

operator -(Currency, double)

public static Currency operator -(Currency a, double b)

Parameters

a Currency
b double

Returns

Currency

operator -(Currency, int)

public static Currency operator -(Currency a, int b)

Parameters

a Currency
b int

Returns

Currency

operator -(Currency, float)

public static Currency operator -(Currency a, float b)

Parameters

a Currency
b float

Returns

Currency

operator -(decimal, Currency)

public static Currency operator -(decimal a, Currency b)

Parameters

a decimal
b Currency

Returns

Currency

operator -(double, Currency)

public static Currency operator -(double a, Currency b)

Parameters

a double
b Currency

Returns

Currency

operator -(int, Currency)

public static Currency operator -(int a, Currency b)

Parameters

a int
b Currency

Returns

Currency

operator -(float, Currency)

public static Currency operator -(float a, Currency b)

Parameters

a float
b Currency

Returns

Currency