You need to sign in to do that
Don't have an account?
wsmith
Do enum data types have a base type?
I want to create a method that handles null enum values. Do I have to create a handler method for each enum data type I want to check or is there a base enum type that enums derive from which the "instanceof" operator will work?
i.e.
enum A {ONE, TWO}
enum B {THREE, FOUR}
void checkEnum(<DataType> value) {
if (value == null)
// log error, etc.
}
However, A and B are not an "instanceof" Object nor sObject so what can "<DataType>" be?
I was looking for another solution, and I came across this unanswered thread, so for future reference:
In the example code, A and B are the data types. That is to say: