How can I cast string to enum

238

How can I cast string to enum? -

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

Comments

Submit
0 Comments