Let consider I have two enums A and B -
enum A { a1, a2, a3, a4, a5, a6 }
enum B { b1, b2, b3 }
I have a function which uses these enums. I want to assign these enums in a new enum on the basis of the conditional logic.
public void UseEnum()
{
enum c;
if (true)
{
c = enumA
}
else
{
c = enumB
}
UseEnumC(c.enumvalue);
}
I want to use this new enum values in this function useEnumC.