This might seems a pretty trivial problem, but every time I've to get an Enum given its name I forgot how to do it, and I've to look for it on Google. So, is there a better way to remember something you always forget than writing a post about it? Back to the problem: going from an Enum to its numeric value or its string representation is quite easy: /* Enum to string */
string stringValue = enumVal.ToString();
/* Enum to numeric value */
int numericVal = (int) enumVal;
And going from a numeric value to the Enum is quite as easy:
/* Numeric value...