Table of Contents
Unit Constructor (Double, UnitType)

Initializes a new instance of Unit and specifies what kind of values it holds.

Syntax
 public Unit(
   double value,
   UnitType type
);

Parameters

value
The value of this Unit instance.
type
The UnitType held by this instance.

Exceptions

Exception Type Condition
ArgumentException

value is negative or equal to PositiveInfinity, NegativeInfinity or NaN.

type is set to Percentage and value greater than 100.

See Also