Just an academical question: Is it possible to avoid int casting when comparing Enum to int?
int i = 0;
if(i == (int)MyEnum.Whatever)
{
}
I would like to overload == operator in such a manner:
public static MyEnum operator ==(int lhs, MyEnum rhs)
{}
Thanks for reading ;-)