No Lamba syntax shown if .ToList() is used

A query like

(from r in Customers where r.City == "London" select r).Dump();

show the lamba syntax of
Customers
   .Where (r => (r.City == "London"))
but nothing is shown for the following query

(from r in Customers where r.City == "London" select r).ToList().Dump();

It's not causing me a problem, but was just wondering why?

Comments

  • In order to display the lambda syntax, LINQPad's Dump method needs to introspect the expression tree. This is not possible after you call ToList because that information is lost at that point - all you have is a list of objects.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!