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

After building and compiling this expression tree, what does calling the resulting delegate return?

var p = Expression.Parameter(typeof(int), "n"); var body = Expression.Multiply(p, Expression.Constant(3)); var lambda = Expression.Lambda<Func<int, int>>(body, p); var fn = lambda.Compile(); Console.WriteLine(fn(4));