Trivia Friday


Everybody loves a cliffhanger, right?  I found myself needing to write the following code the other day:

public static class ExpressionExtensions
{
    public static Expression<Func<T, TResult>> Expr<T, TResult>(
        this T item, 
        Expression<Func<T, TResult>> expr)
    {
        return expr;
    }
}

Why would I want to write something like this, which seems to do absolutely nothing?  One hint – it’s not because I wanted a clever, more terse way to declare an expression, although it does have that effect.

Attack of the pseudo-frames