Get enum value from string or int

40

Get enum value from string or int -

MyEnum myEnum = (MyEnum)myInt;

MyEnum myEnum = (MyEnum)Enum.Parse(typeof(MyEnum), myString);

Comments

Submit
0 Comments