UnitHelper

StockSharp.Messages

Extension class for Unit.

Methods

Percents
public static Unit Percents(int value)
result = UnitHelper.Percents(value)

Convert the Int32 to percents.

value
Int32 value.

Returns: Percents.

Percents
public static Unit Percents(long value)
result = UnitHelper.Percents(value)

Convert the Int64 to percents.

value
Int64 value.

Returns: Percents.

Percents
public static Unit Percents(double value)
result = UnitHelper.Percents(value)

Convert the Double to percents.

value
Double value.

Returns: Percents.

Percents
public static Unit Percents(decimal value)
result = UnitHelper.Percents(value)

Convert the Decimal to percents.

value
Decimal value.

Returns: Percents.

Times
public static Unit Times(Unit unit, int times)
result = UnitHelper.Times(unit, times)

Multiple Value on the specified times.

unit
Unit.
times
Multiply value.

Returns: Result.

ToUnit
public static Unit ToUnit(string str, bool throwIfNull)
result = UnitHelper.ToUnit(str, throwIfNull)

Convert string to Unit.

str
String value of Unit.
throwIfNull
Throw ArgumentNullException if the specified string is empty.

Returns: Object Unit.