Yes, title sounds a bit confusing, so I'll explain what I mean: suppose you have a C# 4.0 'dynamic' object, and the name of a property. How would you retrieve that property from the dynamic object?
In other words, how would you implement:
public static object GetDynamicValue(dynamic o, string name) { ... }
Another way to put it is that I'm trying to treat a dynamic object as an IDictionary.
Note that reflection is likely not an option here, since the dynamic object it could be a custom implementation which is not reflection based (e.g. by extending DynamicObject and doing its own thing).