Closed ma3yta closed 3 years ago
Hey @Ma3yTa
In your example, the compiler will create read only properties on your dynamic object. So based on this, you will not be able to fill a dynamic object. If you were to set your code up like the below (or similar), it will work, but I have identified a change that is required.
dynamic obj = new {};
obj.Name = string.Empty;
obj.Address = new {};
obj.Address.PostCode = 0;
I will get the changes in place and a new version published shortly.
Hey @Ma3yTa
I have released v2.11.0 which allows dynamic/ExpandoObject instances to be populated. This also includes nested dynamic/ExpandoObject properties.
Nick.
@nickdodd79 thank you!
For example: