I am trying to store a linq express in a variable, But it gives me this compile time error
Emebeded Statement can not be a declaration or labled stateme
I found how to assign a linq expression to a variable from this question of stackoverflow Lambdaexpression of Linq-query in a variable
But When i try to implement it, I get the below error , Can someone help me ?
The code I tried
if (dtpFrom.DateTime != null)
Func<BAL.Receipt , DateTime? > expr = receipt => receipt.Date ;