Lambda to Expression tree conversion

You must assign the lambda to a different type:

// Gives you a delegate:
Func<int, int> f = x => x * 2;
// Gives you an expression tree:
Expression<Func<int, int>> g = x => x * 2;

The same goes for method arguments. However, once you’ve assigned such a lambda expression to a Func<> type, you can’t get the expression tree back.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)