C# 3.0 (.NET Framework 3.5) adds some great features, such as extension methods and lambdas, that let’s you write magical code that looks suspiciously Rubyish. Extension methods let you dynamically extend your types so you can do things like this:
OperationResult ParseCustomHeader(WebResponse response)
{
string header = response.Headers[Globals.CUSTOM_ERROR_HEADER_NAME];
return header.Base64ToBinary().UTF8ToString().FromXml();
}
Also, have a look at Sergio’s XmlBuilder to see lambdas and reflection put to good use. I like it when the language does work for me so I can keep my code beautiful.
Random