by camus · 13y ago · 0 comments
For example:
var query = from c in customers
join o in orders on c.ID equals o.ID
select new {
c.Name,
o.Product,
Address = c.MailingAddress
};
Of course, anonymous objects in C# can be a pain in the ass, since you can't usefully return them from a method. Something like Scala's structural types would solve that problem.I don't really like C# that much as a language, but I do like the Linq approach.