April 2013
Intermediate to advanced
1700 pages
92h 51m
English
Although most query expression clauses can be followed by others immediately, there are a few notable exceptions. In particular, select and group by end a query expression because of their projective characteristic. For example:
var query = from product in products select new { product.Name, product.Price };
Once the projection has happened, the query expression produces objects of the type used in the select clause. In this particular example, that’s an anonymous type with two properties: Name and Price. At this point, we don’t have an identifier anymore to refer to those objects: If product would still be “in scope,” we could get access to properties ...
Read now
Unlock full access