With a generic enum
enum MyEnum
{
a = 0,
b = 1,
c = 2
}
If you have this two pieces of code
MyEnum myEnum = 0;
and
int a = 0;
MyEnum myEnum = a; // ERROR, I need (MyEnum)a;
Why in the first one I can implicitly convert a number into an enum while in the second example I got an error because I need a cast?
Thanks for the clarification.