We then create the object of 'ExpandoObject' and assign it to an object which created from 'Dynamic' class type. Please note if we have used 'Dynamic' objects and not expand objects as we still do not know what properties are going to be created during runtime.
dynamic obj = new ExpandoObject();
For creating dynamic property we just need to write the property name and set the value.
obj.Name = "Some Name";
Finally we display the value.
MessageBox.Show(obj.Name);Kundan64, if this helps please login to Mark As Answer. | Alert Moderator