Click or drag to resize

Time(Double, Unit, MetricExponent) Constructor

Creates a new instance of Time with a particular value and Unit.

Namespace: InnerDrive.Quantitative
Assembly: InnerDrive.Quantitative (in InnerDrive.Quantitative.dll) Version: 5.0.8475.0
Syntax
C#
[JsonConstructorAttribute]
public Time(
	double value,
	Unit unit,
	MetricExponent exponent = MetricExponent.Unit
)

Parameters

value  Double
The value of the Time to use.
unit  Unit
The Unit to use.
exponent  MetricExponent  (Optional)
If applicable to unit, the MetricExponent that value is assumed to be already.
Exceptions
ExceptionCondition
IncompatibleUnitExceptionThrown if Time is not the type that the Unit applies to.
Example
The following example creates a Time of 15 milliseconds:
C#
Unit unit = new Second();
double value = 15d;

Time ms = new Time(value, unit, MetricExponent.Milli);
See Also