//IsCellDataValid Method returns bool
MethodInfo isCellDataValidMethod = this.GetType().GetMethod("IsCellDataValid", BindingFlags.NonPublic | BindingFlags.Instance);
var IsCellDataValidMethodCall = Expression.Call(ruleEngineInstance, isCellDataValidMethod, new ParameterExpression[] { method params});
var cellDataValidConstantExp = ConstantExpression.IsTrue(IsCellDataValidMethodCall);
//GetCellTypeCount returns Int
var isCellDataValidExpression = Expression.IfThen(cellDataValidConstant,
GetCellTypeCountMethodCall);
现在我想将此cellTypeCountExpression
的输出与用户输入的值进行比较,并且不希望编译表达式以获得结果,然后构建Constant Expression
我有类似
的东西var resultBinaryExp = ParameterExpression.LessThan(GetCellTypeCountMethodCall,
Expression.Constant(userEnteredValu), typeof(int));