dynamic model = new ExpandoObject();
model.Data = "asdf";
List<dynamic> listOfx = new List<dynamic>();
for (int i = 0; i < 3; i++) {
dynamic x = new ExpandoObject();
x.ID = i;
x.Name = "test" + i.ToString();
listOfx.Add(x);
}
model.listOfx = listOfx;
When I run this, I can see Data inside model, but not listOfx.
Problem: how to get a list(or IEnumerable) inside an ExpandoObject
UPDATE on Solution:

Because I couldn’t see the lifOfx in the locals window I thought it wasn’t working. Here (through y) you can see it is. 🙂
I can’t reproduce similar issues on Mono 2.10:
Output:
I’ll be retesting on windows shortly.
Update have tested the following:
On linux I have only tested the binary compiled by mono itself, but I don’t anticipate any problems. Perhaps there is something subtly different about storing dynamics inside the List<>, I’ll test that now