Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC#expression treesSingle-choice MCQ

Why does the C# compiler reject a statement body (with braces and a return statement) inside an expression-tree lambda, like Expression<Func<int,int>> e = x => { return x + 1; };?

Expression<Func<int, int>> e = x => { return x + 1; };