Closed
Description
Describe the bug
The order of UnitInfo registration in static constructors does not (always) match enum values in-order. This makes trying to retrieve a UnitInfo by index (of the enum value) impossible.
To Reproduce
Steps to reproduce the behavior (just an example):
- Look at
static Length()
- Megameter (value 41) is the 20th index in the array.
Expected behavior
How can we retrieve a UnitInfo based on a unit enum value? We may need to move to a Dictionary.
Additional context
This is especially applicable as I work through #1210, trying to get the abbreviations based on an enum value.