I have problems with the "order" of the values of an enum. It\'s a little difficult to explain, that\'s why I wrote up some code:
class Program
{
pu
The behaviour is specified to be "undefined" (I thought I'd spotted a pattern just now, but apparently not.) The documentation explicitly calls this out:
If multiple enumeration members have the same underlying value and you attempt to retrieve the string representation of an enumeration member's name based on its underlying value, your code should not make any assumptions about which name the method will return.
Either make your enum values distinct, or explicitly create a map from value to desired name.