Unit

StockSharp.Messages

Special class, allows to set the value as a percentage, absolute, points and pips values.

Inherits: Equatable<Unit>

Implements: IOperable<Unit>, IComparable<Unit>, IPersistable, IFormattable

Constructors

Unit
public Unit(decimal value, UnitTypes type, Func<UnitTypes, decimal?> getTypeValue)
unit = Unit(value, type, getTypeValue)

Create a value of types Point and Step.

value
Value.
type
Measure unit.
getTypeValue
The handler returns a value associated with Type (price or volume steps).
Unit
public Unit(decimal value, UnitTypes type)
unit = Unit(value, type)

Create a value of types Absolute and Percent.

value
Value.
type
Measure unit.
Unit
public Unit(decimal value)
unit = Unit(value)

Create absolute value Absolute.

value
Value.
Unit
public Unit()
unit = Unit()

Create unit.

Properties

GetTypeValue
public Func<UnitTypes, decimal?> GetTypeValue { get; set; }
value = unit.GetTypeValue
unit.GetTypeValue = value

The handler returns a value associated with Type (price or volume steps).

Type
public UnitTypes Type { get; set; }
value = unit.Type
unit.Type = value

Measure unit.

Value
public decimal Value { get; set; }
value = unit.Value
unit.Value = value

Value.

Methods

Abs
public Unit Abs()
result = unit.Abs()

Make the value positive.

Returns: Unit

Clone
public override Unit Clone()
result = unit.Clone()

Create a copy of Unit.

Returns: Copy.

CompareTo
public override int CompareTo(Unit other)
result = unit.CompareTo(other)

Compare Unit on the equivalence.

other
Another value with which to compare.

Returns: The result of the comparison.

Convert
public Unit Convert(UnitTypes destinationType, Func<UnitTypes, decimal?> getTypeValue, bool throwException)
result = unit.Convert(destinationType, getTypeValue, throwException)

Cast the value to another type.

destinationType
Destination value type.
getTypeValue
The handler returns a value associated with Type (price or volume steps).
throwException
Throw exception in case of impossible conversion. Otherwise, returns .

Returns: Converted value.

Convert
public Unit Convert(UnitTypes destinationType)
result = unit.Convert(destinationType)

Cast the value to another type.

destinationType
Destination value type.

Returns: Converted value.

Equals
public override bool Equals(object other)
result = unit.Equals(other)

Compare Unit on the equivalence.

other
Another value with which to compare.

Returns: , if the specified object is equal to the current object, otherwise, .

GetHashCode
public override int GetHashCode()
result = unit.GetHashCode()

Get the hash code of the object Unit.

Returns: A hash code.

GetTypeSuffix
public static string GetTypeSuffix(UnitTypes type)
result = Unit.GetTypeSuffix(type)

Get string suffix.

type
Measure unit.

Returns: String suffix.

Load
public void Load(SettingsStorage storage)
unit.Load(storage)

Load settings.

storage
Settings storage.
OnEquals
protected override bool OnEquals(Unit other)
result = unit.OnEquals(other)

Compare Unit on the equivalence.

other
Another value with which to compare.

Returns: , if the specified object is equal to the current object, otherwise, .

op_Addition
public static Unit op_Addition(long l, Unit u)
result = Unit.op_Addition(l, u)

Add the two objects Unit and Int64.

l
First object Int64.
u
Second object Unit.

Returns: The result of addition.

op_Addition
public static Unit op_Addition(decimal d, Unit u)
result = Unit.op_Addition(d, u)

Add the two objects Unit and Decimal.

d
First object Decimal.
u
Second object Unit.

Returns: The result of addition.

op_Addition
public static Unit op_Addition(Unit u, decimal d)
result = Unit.op_Addition(u, d)

Add the two objects Unit and Decimal.

u
First object Unit.
d
Second object Decimal.

Returns: The result of addition.

op_Addition
public static Unit op_Addition(int i, Unit u)
result = Unit.op_Addition(i, u)

Add the two objects Unit and Int32.

i
First object Int32.
u
Second object Unit.

Returns: The result of addition.

op_Addition
public static Unit op_Addition(Unit u, int i)
result = Unit.op_Addition(u, i)

Add the two objects Unit and Int32.

u
First object Unit.
i
Second object Int32.

Returns: The result of addition.

op_Addition
public static Unit op_Addition(Unit u, long l)
result = Unit.op_Addition(u, l)

Add the two objects Unit and Int64.

u
First object Unit.
l
Second object Int64.

Returns: The result of addition.

op_Addition
public static Unit op_Addition(double d, Unit u)
result = Unit.op_Addition(d, u)

Add the two objects Unit and Double.

d
First object Double.
u
Second object Unit.

Returns: The result of addition.

op_Addition
public static Unit op_Addition(Unit u, double d)
result = Unit.op_Addition(u, d)

Add the two objects Unit and Double.

u
First object Unit.
d
Second object Double.

Returns: The result of addition.

op_Addition
public static Unit op_Addition(Unit u1, Unit u2)
result = Unit.op_Addition(u1, u2)

Add the two objects Unit.

u1
First object Unit.
u2
Second object Unit.

Returns: The result of addition.

op_Division
public static Unit op_Division(Unit u, double d)
result = Unit.op_Division(u, d)

Divide a Unit by a Double.

u
First object Unit.
d
Second object Double.

Returns: The result of division.

op_Division
public static Unit op_Division(Unit u, int i)
result = Unit.op_Division(u, i)

Divide a Unit by an Int32.

u
First object Unit.
i
Second object Int32.

Returns: The result of division.

op_Division
public static Unit op_Division(int i, Unit u)
result = Unit.op_Division(i, u)

Divide an Int32 by a Unit.

i
First object Int32.
u
Second object Unit.

Returns: The result of division.

op_Division
public static Unit op_Division(Unit u, long l)
result = Unit.op_Division(u, l)

Divide a Unit by a Int64.

u
First object Unit.
l
Second object Int64.

Returns: The result of division.

op_Division
public static Unit op_Division(Unit u, decimal d)
result = Unit.op_Division(u, d)

Divide a Unit by a Decimal.

u
First object Unit.
d
Second object Decimal.

Returns: The result of division.

op_Division
public static Unit op_Division(long l, Unit u)
result = Unit.op_Division(l, u)

Divide a Int64 by a Unit.

l
First object Int64.
u
Second object Unit.

Returns: The result of division.

op_Division
public static Unit op_Division(double d, Unit u)
result = Unit.op_Division(d, u)

Divide a Double by a Unit.

d
First object Double.
u
Second object Unit.

Returns: The result of division.

op_Division
public static Unit op_Division(decimal d, Unit u)
result = Unit.op_Division(d, u)

Divide a Decimal by a Unit.

d
First object Decimal.
u
Second object Unit.

Returns: The result of division.

op_Division
public static Unit op_Division(Unit u1, Unit u2)
result = Unit.op_Division(u1, u2)

Divide the unit Unit to another.

u1
First object Unit.
u2
Second object Unit.

Returns: The result of the division.

op_Equality
public static bool op_Equality(Unit u, double d)
result = Unit.op_Equality(u, d)

Check whether the Unit is equal to a Double.

u
The Unit to compare.
d
The Double to compare.

Returns: , if the Unit is equal to the Double, .

op_Equality
public static bool op_Equality(decimal d, Unit u)
result = Unit.op_Equality(d, u)

Check whether the Decimal is equal to a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Returns: , if the Decimal is equal to the Unit, .

op_Equality
public static bool op_Equality(Unit u, long l)
result = Unit.op_Equality(u, l)

Check whether the Unit is equal to a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Returns: , if the Unit is equal to the Int64, .

op_Equality
public static bool op_Equality(Unit u, int i)
result = Unit.op_Equality(u, i)

Check whether the Unit is equal to an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Returns: , if the Unit is equal to the Int32, .

op_Equality
public static bool op_Equality(int i, Unit u)
result = Unit.op_Equality(i, u)

Check whether the Int32 is equal to a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Returns: , if the Int32 is equal to the Unit, .

op_Equality
public static bool op_Equality(Unit u1, Unit u2)
result = Unit.op_Equality(u1, u2)

Compare two values for equality (if the value of different types, the conversion will be used).

u1
First unit.
u2
Second unit.

Returns: , if the values are equals, otherwise, .

op_Equality
public static bool op_Equality(double d, Unit u)
result = Unit.op_Equality(d, u)

Check whether the Double is equal to a Unit.

d
The Double to compare.
u
The Unit to compare.

Returns: , if the Double is equal to the Unit, .

op_Equality
public static bool op_Equality(long l, Unit u)
result = Unit.op_Equality(l, u)

Check whether the Int64 is equal to a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Returns: , if the Int64 is equal to the Unit, .

op_Equality
public static bool op_Equality(Unit u, decimal d)
result = Unit.op_Equality(u, d)

Check whether the Unit is equal to a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Returns: , if the Unit is equal to the Decimal, .

op_Explicit(Nullable<double>) : double?

Cast object from Unit to nullable Double.

unit
Object Unit.

Returns: Double value.

op_Explicit(Double) : double?

Cast object from Unit to Double.

unit
Object Unit.

Returns: Double value.

op_Explicit(Nullable<decimal>) : double?

Cast object from Unit to nullable Decimal.

unit
Object Unit.

Returns: Decimal value.

op_Explicit(Decimal) : double?

Cast object from Unit to Decimal.

unit
Object Unit.

Returns: Decimal value.

op_Explicit(Single) : double?

Cast object from Unit to Single.

unit
Object Unit.

Returns: Single value.

op_Explicit(Nullable<float>) : double?

Cast object from Unit to nullable Single.

unit
Object Unit.

Returns: Single value.

op_Explicit(Int64) : double?

Cast object from Unit to Int64.

unit
Object Unit.

Returns: Int64 value.

op_Explicit(Nullable<int>) : double?

Cast object from Unit to nullable Int32.

unit
Object Unit.

Returns: Int32 value.

op_Explicit(Int32) : double?

Cast object from Unit to Int32.

unit
Object Unit.

Returns: Int32 value.

op_Explicit(Nullable<short>) : double?

Cast object from Unit to nullable Int16.

unit
Object Unit.

Returns: Int16 value.

op_Explicit(Int16) : double?

Cast object from Unit to Int16.

unit
Object Unit.

Returns: Int16 value.

op_Explicit(Nullable<long>) : double?

Cast object from Unit to nullable Int64.

unit
Object Unit.

Returns: Int64 value.

op_GreaterThan
public static bool op_GreaterThan(double d, Unit u)
result = Unit.op_GreaterThan(d, u)

Check whether the Double is greater than a Unit.

d
The Double to compare.
u
The Unit to compare.

Returns: , if the Double is greater than the Unit, .

op_GreaterThan
public static bool op_GreaterThan(Unit u, double d)
result = Unit.op_GreaterThan(u, d)

Check whether the Unit is greater than a Double.

u
The Unit to compare.
d
The Double to compare.

Returns: , if the Unit is greater than the Double, .

op_GreaterThan
public static bool op_GreaterThan(long l, Unit u)
result = Unit.op_GreaterThan(l, u)

Check whether the Int64 is greater than a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Returns: , if the Int64 is greater than the Unit, .

op_GreaterThan
public static bool op_GreaterThan(decimal d, Unit u)
result = Unit.op_GreaterThan(d, u)

Check whether the Decimal is greater than a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Returns: , if the Decimal is greater than the Unit, .

op_GreaterThan
public static bool op_GreaterThan(Unit u, long l)
result = Unit.op_GreaterThan(u, l)

Check whether the Unit is greater than a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Returns: , if the Unit is greater than the Int64, .

op_GreaterThan
public static bool op_GreaterThan(int i, Unit u)
result = Unit.op_GreaterThan(i, u)

Check whether the Int32 is greater than a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Returns: , if the Int32 is greater than the Unit, .

op_GreaterThan
public static bool op_GreaterThan(Unit u, decimal d)
result = Unit.op_GreaterThan(u, d)

Check whether the Unit is greater than a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Returns: , if the Unit is greater than the Decimal, .

op_GreaterThan
public static bool op_GreaterThan(Unit u, int i)
result = Unit.op_GreaterThan(u, i)

Check whether the Unit is greater than an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Returns: , if the Unit is greater than the Int32, .

op_GreaterThan
public static bool op_GreaterThan(Unit u1, Unit u2)
result = Unit.op_GreaterThan(u1, u2)

Check whether the first value is greater than the second.

u1
First unit.
u2
Second unit.

Returns: , if the first value is greater than the second, .

op_GreaterThanOrEqual
public static bool op_GreaterThanOrEqual(Unit u, decimal d)
result = Unit.op_GreaterThanOrEqual(u, d)

Check whether the Unit is greater than or equal to a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Returns: , if the Unit is greater than or equal to the Decimal, .

op_GreaterThanOrEqual
public static bool op_GreaterThanOrEqual(decimal d, Unit u)
result = Unit.op_GreaterThanOrEqual(d, u)

Check whether the Decimal is greater than or equal to a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Returns: , if the Decimal is greater than or equal to the Unit, .

op_GreaterThanOrEqual
public static bool op_GreaterThanOrEqual(Unit u, int i)
result = Unit.op_GreaterThanOrEqual(u, i)

Check whether the Unit is greater than or equal to an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Returns: , if the Unit is greater than or equal to the Int32, .

op_GreaterThanOrEqual
public static bool op_GreaterThanOrEqual(Unit u, double d)
result = Unit.op_GreaterThanOrEqual(u, d)

Check whether the Unit is greater than or equal to a Double.

u
The Unit to compare.
d
The Double to compare.

Returns: , if the Unit is greater than or equal to the Double, .

op_GreaterThanOrEqual
public static bool op_GreaterThanOrEqual(Unit u, long l)
result = Unit.op_GreaterThanOrEqual(u, l)

Check whether the Unit is greater than or equal to a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Returns: , if the Unit is greater than or equal to the Int64, .

op_GreaterThanOrEqual
public static bool op_GreaterThanOrEqual(long l, Unit u)
result = Unit.op_GreaterThanOrEqual(l, u)

Check whether the Int64 is greater than or equal to a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Returns: , if the Int64 is greater than or equal to the Unit, .

op_GreaterThanOrEqual
public static bool op_GreaterThanOrEqual(Unit u1, Unit u2)
result = Unit.op_GreaterThanOrEqual(u1, u2)

Check whether the first value is greater than or equal to the second.

u1
First unit.
u2
Second unit.

Returns: , if the first value is greater than or equal the second, otherwise, .

op_GreaterThanOrEqual
public static bool op_GreaterThanOrEqual(double d, Unit u)
result = Unit.op_GreaterThanOrEqual(d, u)

Check whether the Double is greater than or equal to a Unit.

d
The Double to compare.
u
The Unit to compare.

Returns: , if the Double is greater than or equal to the Unit, .

op_GreaterThanOrEqual
public static bool op_GreaterThanOrEqual(int i, Unit u)
result = Unit.op_GreaterThanOrEqual(i, u)

Check whether the Int32 is greater than or equal to a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Returns: , if the Int32 is greater than or equal to the Unit, .

op_Implicit(Unit) : Unit

Cast Single object to the type Unit.

value
Single value.

Returns: Object Unit.

op_Implicit(Unit) : Unit

Cast Int64 object to the type Unit.

value
Int64 value.

Returns: Object Unit.

op_Implicit(Unit) : Unit

Cast Int32 object to the type Unit.

value
Int32 value.

Returns: Object Unit.

op_Implicit(Unit) : Unit

Cast Int16 object to the type Unit.

value
Int16 value.

Returns: Object Unit.

op_Implicit(Unit) : Unit

Cast Decimal object to the type Unit.

value
Decimal value.

Returns: Object Unit.

op_Implicit(Unit) : Unit

Cast Double object to the type Unit.

value
Double value.

Returns: Object Unit.

op_Inequality
public static bool op_Inequality(double d, Unit u)
result = Unit.op_Inequality(d, u)

Check whether the Double is not equal to a Unit.

d
The Double to compare.
u
The Unit to compare.

Returns: , if the Double is not equal to the Unit, .

op_Inequality
public static bool op_Inequality(decimal d, Unit u)
result = Unit.op_Inequality(d, u)

Check whether the Decimal is not equal to a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Returns: , if the Decimal is not equal to the Unit, .

op_Inequality
public static bool op_Inequality(Unit u, long l)
result = Unit.op_Inequality(u, l)

Check whether the Unit is not equal to a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Returns: , if the Unit is not equal to the Int64, .

op_Inequality
public static bool op_Inequality(long l, Unit u)
result = Unit.op_Inequality(l, u)

Check whether the Int64 is not equal to a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Returns: , if the Int64 is not equal to the Unit, .

op_Inequality
public static bool op_Inequality(Unit u, decimal d)
result = Unit.op_Inequality(u, d)

Check whether the Unit is not equal to a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Returns: , if the Unit is not equal to the Decimal, .

op_Inequality
public static bool op_Inequality(Unit u1, Unit u2)
result = Unit.op_Inequality(u1, u2)

Compare two values in the inequality (if the value of different types, the conversion will be used).

u1
First unit.
u2
Second unit.

Returns: , if the values are equals, otherwise, .

op_Inequality
public static bool op_Inequality(Unit u, int i)
result = Unit.op_Inequality(u, i)

Check whether the Unit is not equal to an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Returns: , if the Unit is not equal to the Int32, .

op_Inequality
public static bool op_Inequality(Unit u, double d)
result = Unit.op_Inequality(u, d)

Check whether the Unit is not equal to a Double.

u
The Unit to compare.
d
The Double to compare.

Returns: , if the Unit is not equal to the Double, .

op_Inequality
public static bool op_Inequality(int i, Unit u)
result = Unit.op_Inequality(i, u)

Check whether the Int32 is not equal to a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Returns: , if the Int32 is not equal to the Unit, .

op_LessThan
public static bool op_LessThan(Unit u, long l)
result = Unit.op_LessThan(u, l)

Check whether the Unit is less than a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Returns: , if the Unit is less than the Int64, .

op_LessThan
public static bool op_LessThan(Unit u, double d)
result = Unit.op_LessThan(u, d)

Check whether the Unit is less than a Double.

u
The Unit to compare.
d
The Double to compare.

Returns: , if the Unit is less than the Double, .

op_LessThan
public static bool op_LessThan(Unit u, int i)
result = Unit.op_LessThan(u, i)

Check whether the Unit is less than an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Returns: , if the Unit is less than the Int32, .

op_LessThan
public static bool op_LessThan(decimal d, Unit u)
result = Unit.op_LessThan(d, u)

Check whether the Decimal is less than a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Returns: , if the Decimal is less than the Unit, .

op_LessThan
public static bool op_LessThan(Unit u, decimal d)
result = Unit.op_LessThan(u, d)

Check whether the Unit is less than a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Returns: , if the Unit is less than the Decimal, .

op_LessThan
public static bool op_LessThan(Unit u1, Unit u2)
result = Unit.op_LessThan(u1, u2)

Check whether the first value is less than the second.

u1
First unit.
u2
Second unit.

Returns: , if the first value is less than the second, .

op_LessThan
public static bool op_LessThan(double d, Unit u)
result = Unit.op_LessThan(d, u)

Check whether the Double is less than a Unit.

d
The Double to compare.
u
The Unit to compare.

Returns: , if the Double is less than the Unit, .

op_LessThan
public static bool op_LessThan(long l, Unit u)
result = Unit.op_LessThan(l, u)

Check whether the Int64 is less than a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Returns: , if the Int64 is less than the Unit, .

op_LessThan
public static bool op_LessThan(int i, Unit u)
result = Unit.op_LessThan(i, u)

Check whether the Int32 is less than a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Returns: , if the Int32 is less than the Unit, .

op_LessThanOrEqual
public static bool op_LessThanOrEqual(Unit u, decimal d)
result = Unit.op_LessThanOrEqual(u, d)

Check whether the Unit is less than or equal to a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Returns: , if the Unit is less than or equal to the Decimal, .

op_LessThanOrEqual
public static bool op_LessThanOrEqual(decimal d, Unit u)
result = Unit.op_LessThanOrEqual(d, u)

Check whether the Decimal is less than or equal to a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Returns: , if the Decimal is less than or equal to the Unit, .

op_LessThanOrEqual
public static bool op_LessThanOrEqual(Unit u, int i)
result = Unit.op_LessThanOrEqual(u, i)

Check whether the Unit is less than or equal to an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Returns: , if the Unit is less than or equal to the Int32, .

op_LessThanOrEqual
public static bool op_LessThanOrEqual(Unit u, long l)
result = Unit.op_LessThanOrEqual(u, l)

Check whether the Unit is less than or equal to a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Returns: , if the Unit is less than or equal to the Int64, .

op_LessThanOrEqual
public static bool op_LessThanOrEqual(Unit u1, Unit u2)
result = Unit.op_LessThanOrEqual(u1, u2)

Check whether the first value is less than or equal to the second.

u1
First unit.
u2
Second unit.

Returns: , if the first value is less than or equal to the second, .

op_LessThanOrEqual
public static bool op_LessThanOrEqual(int i, Unit u)
result = Unit.op_LessThanOrEqual(i, u)

Check whether the Int32 is less than or equal to a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Returns: , if the Int32 is less than or equal to the Unit, .

op_LessThanOrEqual
public static bool op_LessThanOrEqual(double d, Unit u)
result = Unit.op_LessThanOrEqual(d, u)

Check whether the Double is less than or equal to a Unit.

d
The Double to compare.
u
The Unit to compare.

Returns: , if the Double is less than or equal to the Unit, .

op_LessThanOrEqual
public static bool op_LessThanOrEqual(Unit u, double d)
result = Unit.op_LessThanOrEqual(u, d)

Check whether the Unit is less than or equal to a Double.

u
The Unit to compare.
d
The Double to compare.

Returns: , if the Unit is less than or equal to the Double, .

op_LessThanOrEqual
public static bool op_LessThanOrEqual(long l, Unit u)
result = Unit.op_LessThanOrEqual(l, u)

Check whether the Int64 is less than or equal to a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Returns: , if the Int64 is less than or equal to the Unit, .

op_Multiply
public static Unit op_Multiply(Unit u1, Unit u2)
result = Unit.op_Multiply(u1, u2)

Multiply the two objects Unit.

u1
First object Unit.
u2
Second object Unit.

Returns: The result of the multiplication.

op_Multiply
public static Unit op_Multiply(decimal d, Unit u)
result = Unit.op_Multiply(d, u)

Multiply a Decimal by a Unit.

d
First object Decimal.
u
Second object Unit.

Returns: The result of multiplication.

op_Multiply
public static Unit op_Multiply(Unit u, decimal d)
result = Unit.op_Multiply(u, d)

Multiply a Unit by a Decimal.

u
First object Unit.
d
Second object Decimal.

Returns: The result of multiplication.

op_Multiply
public static Unit op_Multiply(int i, Unit u)
result = Unit.op_Multiply(i, u)

Multiply an Int32 by a Unit.

i
First object Int32.
u
Second object Unit.

Returns: The result of multiplication.

op_Multiply
public static Unit op_Multiply(Unit u, int i)
result = Unit.op_Multiply(u, i)

Multiply a Unit by an Int32.

u
First object Unit.
i
Second object Int32.

Returns: The result of multiplication.

op_Multiply
public static Unit op_Multiply(long l, Unit u)
result = Unit.op_Multiply(l, u)

Multiply a Int64 by a Unit.

l
First object Int64.
u
Second object Unit.

Returns: The result of multiplication.

op_Multiply
public static Unit op_Multiply(Unit u, long l)
result = Unit.op_Multiply(u, l)

Multiply a Unit by a Int64.

u
First object Unit.
l
Second object Int64.

Returns: The result of multiplication.

op_Multiply
public static Unit op_Multiply(Unit u, double d)
result = Unit.op_Multiply(u, d)

Multiply a Unit by a Double.

u
First object Unit.
d
Second object Double.

Returns: The result of multiplication.

op_Multiply
public static Unit op_Multiply(double d, Unit u)
result = Unit.op_Multiply(d, u)

Multiply a Double by a Unit.

d
First object Double.
u
Second object Unit.

Returns: The result of multiplication.

op_Subtraction
public static Unit op_Subtraction(Unit u, double d)
result = Unit.op_Subtraction(u, d)

Subtract a Double from a Unit.

u
First object Unit.
d
Second object Double.

Returns: The result of subtraction.

op_Subtraction
public static Unit op_Subtraction(Unit u, long l)
result = Unit.op_Subtraction(u, l)

Subtract a Int64 from a Unit.

u
First object Unit.
l
Second object Int64.

Returns: The result of subtraction.

op_Subtraction
public static Unit op_Subtraction(long l, Unit u)
result = Unit.op_Subtraction(l, u)

Subtract the Unit from a Int64.

l
First object Int64.
u
Second object Unit.

Returns: The result of subtraction.

op_Subtraction
public static Unit op_Subtraction(Unit u, int i)
result = Unit.op_Subtraction(u, i)

Subtract an Int32 from a Unit.

u
First object Unit.
i
Second object Int32.

Returns: The result of subtraction.

op_Subtraction
public static Unit op_Subtraction(int i, Unit u)
result = Unit.op_Subtraction(i, u)

Subtract the Unit from an Int32.

i
First object Int32.
u
Second object Unit.

Returns: The result of subtraction.

op_Subtraction
public static Unit op_Subtraction(Unit u, decimal d)
result = Unit.op_Subtraction(u, d)

Subtract a Decimal from a Unit.

u
First object Unit.
d
Second object Decimal.

Returns: The result of subtraction.

op_Subtraction
public static Unit op_Subtraction(decimal d, Unit u)
result = Unit.op_Subtraction(d, u)

Subtract the Unit from a Decimal.

d
First object Decimal.
u
Second object Unit.

Returns: The result of subtraction.

op_Subtraction
public static Unit op_Subtraction(double d, Unit u)
result = Unit.op_Subtraction(d, u)

Subtract the Unit from a Double.

d
First object Double.
u
Second object Unit.

Returns: The result of subtraction.

op_Subtraction
public static Unit op_Subtraction(Unit u1, Unit u2)
result = Unit.op_Subtraction(u1, u2)

Subtract the unit Unit from another.

u1
First object Unit.
u2
Second object Unit.

Returns: The result of the subtraction.

op_UnaryNegation
public static Unit op_UnaryNegation(Unit u)
result = Unit.op_UnaryNegation(u)

Get the value with the opposite sign from the value Value.

u
Unit.

Returns: Opposite value.

Save
public void Save(SettingsStorage storage)
unit.Save(storage)

Save settings.

storage
Settings storage.
ToString
public string ToString(string format, IFormatProvider formatProvider)
result = unit.ToString(format, formatProvider)
ToString
public override string ToString()
result = unit.ToString()

Преобразовать к строковому представлению.

Returns: Строковое представление.