title: Using TypeBuilder to create a pass-through constructor for the base class
body: <p>Say I have a <code>SpaceShip</code> class, like so:</p>
  
  <pre><code>public class SpaceShip {
      public SpaceShip() {  }
      public SpaceShip(IRocketFuelSource fuelSource) {  }
  }
  </code></pre>
  
  <p>I want to use <a href="http://msdn.microsoft.com/en-us/library/bhb2ecb2.aspx" rel="noreferrer"><code>TypeBuilder</code></a> to create a type at run-time which inherits from SpaceShip, and defines one constructor for each of the ones in SpaceShip. I don't need the constructors to actually <em>do</em> anything except pass their arguments up to the parent ("pass-through" constructors). For example, the generated type would look something like this if expressed in C#:</p>
  
  <pre><code>public class SpaceShipSubClass : SpaceShip {
      public SpaceShipSubClass() : base() {  }
      public SpaceShipSubClass(IRocketFuelSource fuelSource) : base(fuelSource) {  }
  }
  </code></pre>
  
  <p>To complicate things a bit, I don't actually know which class the generated type will be inheriting from until run-time (so I'll have to take into account any number of  constructors, possibly with default parameters).</p>
  
  <p>Is this possible? I think I could figure it out if I had a general direction to start with, it's just that I'm completely new to <code>TypeBuilder</code>.</p>
  
  <p>Thanks!</p>