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
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.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
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):
static Length()
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.
The text was updated successfully, but these errors were encountered: