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
public enum PopulationGrowth
{
Zero,
Minus2Percent
}
and want to use them as integer enums but define their display name via x-enumNames with spaces, special characters, etc. such that, e.g., above enum looks nice
0
-2%
how would you achieve this? I do not see a way in the Enums wiki. I tried using System.ComponentModel.DataAnnotations.DisplayAttribute but it had no effect.
I'm not sure if I'm missing something or else, this should be converted to a feature request! :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If you have an enum, e.g., like
and want to use them as integer enums but define their display name via
x-enumNames
with spaces, special characters, etc. such that, e.g., above enum looks nicehow would you achieve this? I do not see a way in the Enums wiki. I tried using
System.ComponentModel.DataAnnotations.DisplayAttribute
but it had no effect.I'm not sure if I'm missing something or else, this should be converted to a feature request! :)
Beta Was this translation helpful? Give feedback.
All reactions