> Code such as below does not compile:
> enum TestEnum {eeny, miney, moe};
> //...
> TestEnum e = TestEnum.eeny;
> bool b = ((IConvertible)e).ToBoolean(); // <- compile error
Oh, my fault, this will require two casts. It looks strange, but
bool b = ((IConvertible)(Enum)e).ToBoolean(null);
This will set b to false is e is equal to TestEnum.eeny or it will be true
otherwise.
Sergey