Suppose there's an enum like so.
[Flags]
public enum Crazies
{
One = 2,
Two = 3,
Three = 4
}
Now, when I force the different values to be stringified, I get the text in the beautiful tongue, which differ considerably from the usual meaning of the numerics. Suppose now that the users prefer a more conventional definition of the natural numbers and wish to see the text "Two", although the variable value is One (NB it's Crazies.One).
What'd be the simplest way to map the stringification of the predefined names of the elements? Right now I'll go with something like the following but I don't really like it.
private static String DecrazyfyCrazies(Crazies wrong)
{
switch(wrong)
{
case Crazies.One: return "Two";
case Crazies.Two: return "Three";
}
return "Four";
}