Class DeviceFormatters.ScaledDecimal

Namespace
ProtoTest.Devices
Assembly
ProtoTest.Devices.dll

A decimal sent as a whole number scaled by 10^decimals: with 2, 12.50 is 1250.

public abstract class DeviceFormatters.ScaledDecimal : IDeviceFieldFormatter<decimal>
Inheritance
DeviceFormatters.ScaledDecimal
Implements
Derived
Inherited Members
Extension Methods

Constructors

ScaledDecimal(int)

A decimal sent as a whole number scaled by 10^decimals: with 2, 12.50 is 1250.

protected ScaledDecimal(int decimals)

Parameters

decimals int

Methods

Format(decimal)

Writes the value as the device sends it.

public string Format(decimal value)

Parameters

value decimal

Returns

string

Parse(string)

Reads the device's text; throws FormatException when it is not a value.

public decimal Parse(string text)

Parameters

text string

Returns

decimal