You can learn more about them in my previous New "Orcas" Language Feature: Anonymous Types blog post.
While anonymous types can be super useful when you want to locally iterate and work with data, we'll often want/need to define a standard class when passing the results of our LINQ query between multiple classes, across class library assemblies, and over web-services.
In the code samples above, though, I am using the shaping/projection features of LINQ to instead define a new anonymous type on the fly, and I am defining two properties on it - Name and Feed - that I want populated using the As you can see above (and below), I can then work against this returned sequence of data just like I would any collection or array in . VS 2008 provides full intellisense and compilation checking support over this anonymous type sequence: I can also data-bind the results against any UI control in ASP. For example, assuming I had a dropdownlist control defined in my page like so: I could use the below LINQ to XML code to databind the results to it: This will then produce a nice drop-downlist in our HTML page like so: In my code above I've taken advantage of a new language feature in VB and C# called "anonymous types".
Anonymous types enable developers to concisely define inline CLR types within code, without having to explictly define a formal class declaration of the type.
Iranian protests: World is watching response, US warns The White House says Iran should respect the rights of protesters who have taken to the streets.