enumaration datatype question

I have a function that gets an operand of a specific enum type that is predefined.

I want the function for safety reason to test if the operand belongs to the specific enum type.how can i do that?

I want the function for safety reason to test if the operand belongs to the specific enum type.how can i do that?

If the function accepts an enum, not an int that might be an enum value, then the value MUST be valid for that enum. You do not have to replicate what the compiler does.