Possible Duplicate:
How should anonymous types be used in C#?
What are anonymous types in C#, and when should they be used?
Possible Duplicate:
How should anonymous types be used in C#?
What are anonymous types in C#, and when should they be used?
Anonymous types are types created on the fly typically in order to return results in a LINQ statement. Here's an example from MSDN
var productQuery =
from prod in products
select new { prod.Color, prod.Price };
A new type with the read-only properties Color and Price is created and the query returns instances of this type when enumerated.
foreach(var product in productQuery) {
Console.WriteLine(product.Color);
}
product
will be of the anonymous type defined above.
Anonymous types are useful for returning several properties from a query without having to define a type explicitly for that purpose.
Straight from the horse's mouth: http://msdn.microsoft.com/en-us/library/bb397696.aspx