Currently there isn't a reverse conversion for EnumToString, which would convert the string back to the respective type variable value. Could we get this function attached as additional information, added to the typename class?
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- General
Additional Information
static int StringToEnum(typename e, string enumName) { int count = e.GetVariableCount(); int value; for (int i = 0; i < count; i++) { if (e.GetVariableType(i) == int && e.GetVariableValue(null, i, value) && e.GetVariableName(i) == enumName) { return value; } } return -1; }
Event Timeline
This comment was removed by Geez.
Comment Actions
Hello OfficialWardog.
The function has been added internally and will appear in one of the future updates.
Regards,
Geez