Dynamic in C# 4.0: Creating Wrappers with DynamicObject
Posted by: C# Frequently Asked Questions,
on 19 Oct 2009 |
View original | Bookmarked: 0 time(s)
In the previous post I showed how you can use the new dynamic feature and the ExpandoObject class to add and remove properties at run time, and how this can make your code more readable and flexible than code written with LINQ to XML syntax.
But there were some obvious flaws in that example: While ExpandoObject provided better syntax, LINQ to XML provided a lot of useful library methods that helped you to work with XML files. So, is it possible to combine those two advantages, to have better syntax...