I am struggling with the correct cast. May someone can show me the right direction?
See my example below:
public enum E_Enum1
{
Value1,
Value2,
Value3
}
public enum E_Enum2
{
Bla,
blubb,
whatever
}
public void myMethod(Enum e)
{
//print e.value in int
//print e.toString()
}
myMethod(E_Enum2.whatever);
myMethod(E_Enum1.Value2);
I want to get a result of:
2
whatever
1
Value2