3 ms·
Objects are fine, it's classes that are often limiting. Consider the very first example above (corrected to be valid): var r = customers.Select(c => new { c
by int_19h 9y ago
Objects are fine, it's classes that are often limiting. Consider the very first example above (corrected to be valid):
var r = customers.Select(c => new { cust = c, orders = c.Orders })
This gives you an IEnumerable (basically, a forward-only sequence) of objects - but these objects are of an anonymous type that was implicitly defined by "new".