1

I saw an article that shows how I can Concatenate two Expression<Func<T, bool>> variables.

But is here some ways to do this also with Expression<Action<T>> ?

Here is what I have tried:

public static Expression<Action<T>> Add<T>(this Expression<Action<T>> left, Expression<Action<T>> right)
{
    //var param = Expression.Parameter(typeof(T), "x");
    var body = Expression.AndAssign(
            Expression.Invoke(left),
            Expression.Invoke(right)
        );
    var lambda = Expression.Lambda<Action<T>>(body);
    return lambda;
}
vestland
  • 55,229
  • 37
  • 187
  • 305
  • I'd guess that this is .NET and C#, but I shouldn't have to. Please add appropriate language tag(s) (If for no other reason, so that the syntax highlighting can kick in) – Damien_The_Unbeliever Jan 22 '13 at 08:09

0 Answers0