lucuma
1
I’m having a bit of trouble trying to use an enum in a ScriptContext. What is the recommended way to implement or use an enum in a script:
#if SomeObject.EnumField != MyEnum.TheValue
This actually fails at run time:
var context = new ScriptContext() {
ScriptTypes =
{
typeof(MyEnum)
}
}.Init();
mythz
2
You can use the isEnum()
or hasFlag()
scripts, see:
1 Like