title: Dynamically create instance of a class which is derived from an abstract class
body: <p>I have 2 classes which are derived from an abstract class </p>
  
  <pre><code>abstract class Order
  {
     public virtual boolean Export()
     {
          ...
     }
  }
  
  class TradeOrder : Order
  {
        public override bool Export()
        {
              //Create a new order 
        }
  }
  
  class LibraryOrder : Order
  {
        public override bool Export()
        {
              //Dont create order but Update an existing order 
        }
  
  }
  </code></pre>
  
  <p>TradeOrder is created for customertype  "Trade" and LibraryOrder is created for customertype "Library".</p>
  
  <p>The customer type will grow in near future.</p>
  
  <p>How do I create instance of the derived class based on the customer type without using if...else or swicth ...case?</p>
  
  <p>The instance of the class will call the export method to either create or update a sales order.</p>
  
  <p>-Alan-</p>