Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | FinFan |
I know it’s not a Java, but anyway, how I can the check enum type?
enum ETestType {
Enum1,
Enum2,
Enum3
}
func check(enumType):
if enumType is ETestType:
print("is a my enum what i need!")
Or there is no way check it?
P.S> if it helps, I need that for only one function for ALL my enums stored in Singleton.
actually for calling the name of Enum by Singleton.get_enum_name(enumType)
func get_enum_name(enumType, idx):
if enumType is EMyEnum:
return EMyEnum.keys()[idx]
THank you guys!