I\'m looking for a way to add members dynamically to an dynamic object. OK, I guess a little clarification is needed...
When you do that :
dynamic fo
ExpandoObject implements IDictionary albeit explicitly. What this means is that you can simply cast the ExpandoObject to IDictionary and manipulate the dictionary.
dynamic foo = new ExpandoObject(); foo.Bar = 42; food = (IDictionary)foo; food["Baz"] = 54