Convert String to Enum
From Birnam Designs Wiki
example for converting a string to an enum:
enum Colour { Red, Green, Blue };
Colour c = (Colour)Enum.Parse(typeof(Colour), "Red", true);
Console.WriteLine("Colour Value: {0}", c.ToString());
// Picking an invalid colour throws an ArgumentException. To// avoid this, call Enum.IsDefined() first, as follows:string nonColour = "Polkadot";
if (Enum.IsDefined(typeof(Colour), nonColour))
c = (Colour)Enum.Parse(typeof(Colour), nonColour, true);
elseMessageBox.Show("Uh oh!");