How to Convert a string numeric value of an Enum to an enumerated object?
You can use the Parse method of the Enum object.
Say, this is the enum defined:
enum Colors {Red=1, Green=2, Blue=4}
string mystring="Red";
Colors myEnum=(Colors)Enum.Parse(typeof(Colors),mystring);
Console.WriteLine("My Color is : {0}", myEnum.ToString());
Index