Showing posts with label Anonymous Types. Show all posts
Showing posts with label Anonymous Types. Show all posts

Monday, January 30, 2012

How to create a generic list with anonymous types in C# 3.X

What?

How to create a generic list with anonymous types in C# 3.X

Why?

Anonymous Types is a new feature that is introduced with C# 3.0
Anonymous types are particularly useful when querying and transforming data with LINQ.

So what’s the difference between a normal type and an anonymous type?
First and most important: the anonymous type has no type name.