Table of Contents

Class PrefixUnit

Namespace
Codebelt.Unitify
Assembly
Codebelt.Unitify.dll

Represents the prefix of a unit of measurement.

public class PrefixUnit : Unit, IEquatable<IUnit>, IPrefixUnit, IUnit, IBaseUnit
Inheritance
Object
PrefixUnit
Implements
IEquatable<IUnit>
Inherited Members
Extension Methods

Constructors

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.

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.

Properties

Prefix

Gets the prefix multiple to this unit.

public IPrefix Prefix { get; }

Property Value

IPrefix

The prefix multiple to this unit.

Methods

ToString()

Returns a System.String that represents this instance.

public override string ToString()

Returns

String

A System.String that represents this instance.

See Also