I have a function which creates a delegate using expression trees. Within this expression I use a variable captured from multiple parameters passed in to the function. The a
I think you're looking for Expression.Quote, which supports the variable capture in Lambda expressions. Basically the inner LambdaExpression (which will reference the captured variables) need to be wrapped in an Expression.Quote(...) call.
Examples and discussion here: What does Expression.Quote() do that Expression.Constant() can’t already do?