I\'ve been searching but I can\'t find how to cast from the type
Expression>
to the type:
Exp
Just define the out TResult as object and compile the expression, it works for all data types;
Expression> dateExp = text => DateTime.Now; object dt = dateExp.Compile()("hi"); Console.WriteLine(dt);
Fiddle sample here