Well, I'm sure it is simple, but I have a senior point.
I have a simple BinaryExpression (more) and the left side is a ParameterExpression expression and the right side is ConstantExpression. I want to compile this expression in func, which I can call and pass a parameter ...
var func = ...something with my exp.... bool result = func(myValue);
Thanks to Hassan, I changed his response to my needs ...
var func = Expression.Lambda<Func<int,bool>>(myExpr, (ParameterExpression)myExpr.left).Compile();
source share