C# How to implement a main object with additional objects?
<p>I have a main object which has some properties and methods. This object can have multiple parts. These parts are required. The amount of these parts is variable.</p>

<p>Each part has different properties and is referenced to the main object.</p>

<p>To accomplish this in my GUI I have a tabcontrol. The first tab is the main object. The other tabs describes the main object further. These 'other' tabs are the parts I mentioned above.</p>

<p>I am trying to design an architecture, but I can't figure I hope yoy can help me.</p>

<p>As suggested from the answers, the part-tabs inherit from an interface. But how does the main know about it's parts? The parts can't be hardcoded because it is variable. To hardcode the parts is a violation of the OCP principle.</p>

<p>Also, when loading the main object, again, how does it knows about it parts? I have to 'register' them somewhere, but where?</p>
