Are anonymous types supported when used inside a list?
stecydube opened this issue · comments
In trying to display a list with items made from an anonymous type the code in LinqPAD could not be compiled and complained about a possible missing reference.
Part of the generated code:
truck.UnLoadCargo<List<AnonymousType<Guid, String ......
Hi, it should work with anonymous types, however I can see the error here: AnonymousType
There no such a thing like an AnonymousType class that represents anonymous types. This is clearly a bug, I'll investigate and provide a fix in the next release
To fix your issue change in the linqpad script
truck.UnLoadCargo<List<AnonymousType
with
var @object = truck.UnLoadCargo(typeof(IList));
That should retrieve the list with the anonymous type.
I will include a proper fix in the next release
fixed in the next release