31.7.07

Generic List of Anonymous Types...

.NET Framework 3.5 brings us new language concepts like anonymous types, extension methods, etc. "Anonymity" of anonymous types limits us in creating a generic collection of that type, but fortunately, other new features help us in solving this problem.
This sample uses anonymous types, object and collection initializers and extension methods to achieve this...



If you are unfamiliar with new .NET Framework 3.5 language features, visit ScottGu's blog for clarification (under "Language Improvements and LINQ").

No comments: