Table of Contents

Class PrefixExtensions

Namespace
Codebelt.Unitify
Assembly
Codebelt.Unitify.dll

Extension methods for the IPrefix interface.

public static class PrefixExtensions
Inheritance
Object
PrefixExtensions

Methods

ToBaseUnit(IPrefix, IBaseUnit, Double)

Converts the specified IPrefix to a base unit.

public static IUnit ToBaseUnit(this IPrefix prefix, IBaseUnit baseUnit, double value)

Parameters

prefix IPrefix

The IPrefix to extend.

baseUnit IBaseUnit

The base unit of measurement.

value Double

The value of the base unit.

Returns

IUnit

An IUnit implementation.

Exceptions

System.ArgumentNullException

prefix is null -or- baseUnit is null.

ToPrefixUnit(IPrefix, IUnit)

Converts the specified IPrefix to an IUnit implementation equivalent.

public static IPrefixUnit ToPrefixUnit(this IPrefix prefix, IUnit unit)

Parameters

prefix IPrefix

The IPrefix to extend.

unit IUnit

The unit of measurement that is used as a standard for measurement of the same kind of quantity.

Returns

IPrefixUnit

An IPrefixUnit implementation.

Exceptions

System.ArgumentNullException

unit is null.