Anonymous types

Anonymous types are the new concept in C#3.0 which allow to create new types without defining them.

Why are Anonymous types introduced in C#?

Anonymous types have been introduced to support one of the most useful features called LINQ. It's most useful when you are querying collection of object using LINQ query and you want to return only a few of its properties.

How to define Anonymous types ?

One can define Anonymous types easily by using new keyword of C#. Here is the example of it: