The following code seems reasonable to me. It should create the object and then use the dynamic features to let me assign any properties I like. However the compiler says that "ExpandoObject does not contain a definition for Test". To which I say, "I know, that's the freaking point!"
dynamic example = new ExpandoObject
{
Test = "fail"
};
Any ideas why csc isn't allowing this.
The alternative is to manually expand the code into individual property assignments.
dynamic example = new ExpandoObject();
example.Test = "fail";
Which is annoying when I have lots of properties to assign.