P
pompair
Hi,
Does anyone know how to use anonymous types in a list?
I mean, if you define in your code three anonymous types:
new {FirstName = "Donald", LastName = "Duck"};
new {FirstName = "Mickey", LastName = "Mouse"};
new {FirstName = "Minnie", LastName = "Mouse"};
How can one make a list collection out of those? I could make a
generic list of object but getting them back on enumeration would be
difficult without a type to cast them back to, wouldn't it!
Anonymous types give an app developer the possibility to create types
on the fly. I think it would be handy to have the possibility to
change an anonymous type to a real one.
-pom-
Does anyone know how to use anonymous types in a list?
I mean, if you define in your code three anonymous types:
new {FirstName = "Donald", LastName = "Duck"};
new {FirstName = "Mickey", LastName = "Mouse"};
new {FirstName = "Minnie", LastName = "Mouse"};
How can one make a list collection out of those? I could make a
generic list of object but getting them back on enumeration would be
difficult without a type to cast them back to, wouldn't it!
Anonymous types give an app developer the possibility to create types
on the fly. I think it would be handy to have the possibility to
change an anonymous type to a real one.
-pom-