Click or drag to resize

UnitsExtensions.GetUnits Method

Gets the units that are compatible to a given SI unit.

Namespace: Altaxo.Units
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3261.0 (4.8.3261.0)
Syntax
C#
public static IEnumerable<(Type Type, UnitDescriptionAttribute DescriptionAttribute)> GetUnits(
	SIUnit siUnit,
	bool includeSelf = false
)

Parameters

siUnit  SIUnit
The SI unit.
includeSelf  Boolean  (Optional)
If true, the unit given in the argument is included in the enumeration, if it is a predefined unit.

Return Value

IEnumerable<ValueTuple<Type, UnitDescriptionAttribute>>
All units compatible to the given SI unit. If argument includeSelf is true, the unit given in the argument siUnit is also included.
See Also