title: Better approach for implementing 2 similar classes
body: <p>I am importing and exporting from <a href="http://www.wfmc.org/xpdl.html" rel="nofollow">the XPDL standard</a> using C#.</p>
  
  <p>I have written a hierarchy for classes using <a href="http://www.xpdl.org/documents.html" rel="nofollow">XPDL 2.1</a> and have debugged serialization with <code>XmlSerializer</code>. I need to implement <a href="http://www.xpdl.org/standards/xpdl-2.2/XPDL%202.2%20%282012-08-30%29.pdf" rel="nofollow">XPDL 2.2</a>.</p>
  
  <p>The structure of the classes has changed. There are additional parameters as well. There was list of <code>Artifacts</code> which was child of the root class, but the newer version lost <code>DataObject</code> from all of Artifacts. The DataObjects moved from an additional List into <code>WorkflowProcess</code>.</p>
  
  <p>I need to support <a href="http://www.xpdl.org/documents.html" rel="nofollow">XPDL 2.1</a> and <a href="http://www.xpdl.org/standards/xpdl-2.2/XPDL%202.2%20%282012-08-30%29.pdf" rel="nofollow">XPDL 2.2</a>. What is the best way to implement both of them?</p>
  
  <p>I can see <strong>3</strong> ways:</p>
  
  <ol>
  <li>Copy and paste existing hierarchy with needed fixes (it is awful!) </li>
  <li>Create a base class and create two child classes. One for 2.1 and another for 2.2 (but will not it be too complex to maintain?) </li>
  <li>Implement conditional serialization using an <code>enum</code> variable. The class will contain the super-set of 2.1 and 2.2 (This option seems overly complex)</li>
  </ol>
  
  <p>Please let me know if there is a better approach.</p>