Click or drag to resize

UnitsExtensionsGetAvailableUnitsForQuantity Method

Gets all available units for a given quantity.

Namespace: Altaxo.Units
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static IEnumerable<IUnit> GetAvailableUnitsForQuantity(
	string quantity,
	IReadOnlyDictionary<Type, UnitDescriptionAttribute>? allDefinedUnits = null
)

Parameters

quantity  String
The quantity (e.g. 'Length', 'Time' etc).
allDefinedUnits  IReadOnlyDictionaryType, UnitDescriptionAttribute  (Optional)
Dictionary with all defined units. If you provide null, all defined units will be searched in the assemblies, which may take some time.

Return Value

IEnumerableIUnit
All unit instances of the given quantity.
See Also