There are a lot of C# Enums in Mechancial ACT Console. How do I convert them into lists so that one can loop over Enums?
Using functions Enum.GetValues and clr.GetClrType(<Enum>)
Enum.GetValues
clr.GetClrType(<Enum>)
Enum.GetValues returns an Array type - System.Array
Array
System.Array
To convert it into list use - list()
list()
Example code:
import clr from System import Enum for element_type in list(Enum.GetValues(clr.GetClrType(ElementTypeEnum))): print element_type