How can I pass different enums types to a same variable, identify its type later and use its raw values to do some operations?
I have two enums Menu1 and Menu2 of type String. I like to pass an array of enums to another class which shows submenu. I like to pass enum to same variable since I may add another menu in future.