Table of Contents

Class QuantityWithUnit

Namespace
H.Extensions.Unit
Assembly
H.Extensions.Unit.dll

Class to represent a quantity of a particular unit, e.g 5.25 ft

public class QuantityWithUnit : INotifyPropertyChanged
Inheritance
QuantityWithUnit
Implements
Inherited Members
Extension Methods

Constructors

QuantityWithUnit()

public QuantityWithUnit()

QuantityWithUnit(UnitsSystem, IPhysicalQuantity)

public QuantityWithUnit(UnitsSystem system, IPhysicalQuantity qty)

Parameters

system UnitsSystem
qty IPhysicalQuantity

QuantityWithUnit(double, Unit)

public QuantityWithUnit(double qty, Unit unit)

Parameters

qty double
unit Unit

Properties

CurrentUnitIndex

public int CurrentUnitIndex { get; set; }

Property Value

int

Dimensions

public Dimensions Dimensions { get; set; }

Property Value

Dimensions

PhysicalQuantity

public IPhysicalQuantity PhysicalQuantity { get; set; }

Property Value

IPhysicalQuantity

PossibleUnits

public List<Unit> PossibleUnits { get; }

Property Value

List<Unit>

Quantity

public double Quantity { get; set; }

Property Value

double

System

public UnitsSystem System { get; set; }

Property Value

UnitsSystem

Unit

public Unit Unit { get; set; }

Property Value

Unit

Methods

OnPropertyChanged(string)

protected void OnPropertyChanged(string name = null)

Parameters

name string

Events

PropertyChanged

Occurs when a property value changes.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler