How can I cast string to enum

234

How can I cast string to enum? -

YourEnum foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);

Comments

Submit
0 Comments