Articles in categories

Articles

Parse string to enum

Parse a string value to an Enum type. The stringToParse value needs to exist in the enumeration.

var test = (EnumType) Enum.Parse(typeof (EnumType), "stringToParse");