public class GetEnumTypeFromString { public GetEnumTypeFromString(Type theType, String theString) { return (theType)Enum.Parse(typeof(theType), theString); } }