You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
Just wanted to ask why density in kg/l is preffered over kg/dm3? Is it possible to define an alias kg/dm3 so that is recognised by UnitsNet as kg/l and thus processed the samy way (parsing, converting, etc)?
It is defined here.
Regards
Libor
The text was updated successfully, but these errors were encountered:
I don't know why- but there does seem to be a bias against the decimeter (I remember it used to be one of my favorite units back in primary school).
If you're only interested in the abbreviation, you could map it using the
UnitAbbreviationsCache.MapUnitToAbbreviation: this should work if you only want to be parsing units such as "kg/dm3"
UnitAbbreviationsCache.MapUnitToDefaultAbbreviation: this would make it also be the default ToString abbreviation for the given unit
If you really need to have KillogramPerCubicDecimeter as a separate enum value, you'd have to go the PR route: we've already covered the cubic meter, centimeter, millimeter, foot, inch and yard - what's another decimeter.. 😄
Hello
Just wanted to ask why density in kg/l is preffered over kg/dm3? Is it possible to define an alias kg/dm3 so that is recognised by UnitsNet as kg/l and thus processed the samy way (parsing, converting, etc)?
It is defined here.
Regards
Libor
The text was updated successfully, but these errors were encountered: