Table of Contents

PrefixUnit Constructor

Definition

Namespace
Codebelt.Unitify
Assemblies
Codebelt.Unitify.dll
Source
src/Codebelt.Unitify/PrefixUnit.cs

PrefixUnit(IUnit, IPrefix)

Initializes a new instance of the PrefixUnit class.

public PrefixUnit(IUnit unit, IPrefix prefix = null)

Parameters

unit IUnit

The unit of measure to shallow copy to this instance.

prefix IPrefix

The prefix to associate with this instance.

PrefixUnit(IBaseUnit, double, IPrefix, Action<UnitFormatOptions>)

Initializes a new instance of the PrefixUnit class.

public PrefixUnit(IBaseUnit baseUnit, double value, IPrefix prefix = null, Action<UnitFormatOptions> setup = null)

Parameters

baseUnit IBaseUnit

The base unit of measurement.

value double

The value of this unit.

prefix IPrefix

The optional prefix to associate with this unit.

setup Action<UnitFormatOptions>

The UnitFormatOptions which may be configured.