C# dynamic classes
<p>I'm talking about something similar to <code>dynamic</code>. <a href="http://stackoverflow.com/questions/1408658/c-dynamic-classes-at-run-time">This</a> didn't answer my question, hence this question. I want to have a class that I can add properties to at runtime. It needs to be inherited from the type <code>object</code>.</p>

<p>I've seen inheriting from <code>DynamicObject</code>, but it didn't state how to add properties at run-time. Could some light be shed on this for me pls?</p>

<p>I have a class like this:</p>

<pre><code>public class SomeModel : DynamicObject {
       public string SomeMandatoryProperty {get; set;}
}
</code></pre>

<p>I'd like to add all properties from another class to this class at runtime. So eg.</p>

<pre><code>SomeModel m = new SomeModel();
m = someOtherClass;
string hi = m.otherClassProp; //Property from other class is added.
string mandatory = m.SomeMandatoryProperty; //From the mandatory property set previously.
</code></pre>
