UnitsNet icon indicating copy to clipboard operation
UnitsNet copied to clipboard

ElectricResistanceUnit do work no more

Open BernhardJosef opened this issue 2 years ago • 1 comments

Describe the bug The Unit 'Ohm' is now unknown.

To Reproduce Enum unitOhm = UnitParser.Default.Parse("Ohm", typeof(ElectricResistanceUnit));

Expected behavior Support of ElectricResistanceUnit from mOhm to TOhm.

Screenshots UnitsNet.UnitNotFoundException: "Unit not found with abbreviation [Ohm] for unit type [UnitsNet.Units.ElectricResistanceUnit].".

Additional context

BernhardJosef avatar Sep 13 '23 15:09 BernhardJosef

Did this ever work? In what version?

The abbreviation is defined as Ω in JSON. https://github.com/angularsen/UnitsNet/blob/master/Common/UnitDefinitions/ElectricResistance.json#L11-L22

// Throws
// UnitParser.Default.Parse("Ohm", typeof(ElectricResistanceUnit))

// OK
UnitParser.Default.Parse("Ω", typeof(ElectricResistanceUnit))

angularsen avatar Sep 16 '23 11:09 angularsen