Using extension method we can create methods to convert an enum to other datatype like string, int by creating extension methods ToInt(), ToString()
ToInt()
ToString()
Do you really need those extension methods?
MyEnum fromInt = (MyEnum)someIntValue; MyEnum fromString = (MyEnum)Enum.Parse(typeof(MyEnum), someStringValue, true); int intFromEnum = (int)MyEnum.SomeValue; string stringFromEnum = MyEnum.SomeValue.ToString();