Inspecting the code repository of a client, I found something like this:
var customer = new { Id = default(int), Name = default(string) }; var list = new int[0].Select(i => customer).ToList();
I confess that I needed some time to understand it. But, after some consideration, I figured out that what this code is doing is to create an empty strongly typed list of … an anonymous type.
Smart code. Yeah! But, please, don’t do that.