Flee
Flee copied to clipboard
Evaluate returns false and doesn't set property value
I'm trying to execute this:
IDynamicExpression eDynamic = engineContext.CompileDynamic("Object.Width = 0.20");
var res = eDynamic.Evaluate();
,
but for some reason, "res" is false and evaluation doesn't set anything. Is setting variable property value allowed?
The "=" is used as an Equality Comparison operator (==) to support expressions that use this by default. You could try to override the operator (see #54 for an example).
So by default it will return false if you're trying to set it to a new value, because it sees it as: OldValue == NewValue which is most likely false.