I understand lambdas and the Func
and Action
delegates. But expressions
stump me.
In what circumstances would you use an Expression
I'd like to add some notes about the differences between Func
and Expression
:
Func
is just a normal old-school MulticastDelegate;Expression>
is a representation of lambda expression in form of expression tree;Func
;ExpressionVisitor
;Func
;Expression>
.There's an article which describes the details with code samples:
LINQ: Func
Hope it will be helpful.