title: Automatically making Base Constructors available in derived class?
body: <p>I have a Base Class with two constructors, requiring a parameter:</p>
  
  <pre><code>public abstract class StoreBase 
  {
      private readonly SomeObject_sobj;
  
      protected StoreBase(SomeObject sobj)
      {
          _sobj = sobj;
      }
  
      protected StoreBase(OtherObject oobj)
      {
          _sobj = new SomeObject(oobj);
      }
  }
  </code></pre>
  
  <p>Then I have a derived class:</p>
  
  <pre><code>public class MyDerived: StoreBase
  {
  
  }
  </code></pre>
  
  <p>This causes a compilation error as <code>base class doesn't contain parameterless constructor</code>.</p>
  
  <p>My understanding is that because MyDerived doesn't contain a constructor, the compiler adds a parameterless constructor (that's well known and nothing to do with derived classes). However, as it derives from another class, the base class constructor needs to run first, and there is no way to determine which constructor should run from the empty MyDerived constructor.</p>
  
  <p>Basically I'm asking: can I avoid copy/pasting all constructors from Base into Derived class if I really don't need additional constructor logic? Can I say "Take all constructors from base" without adding them all?</p>
  
  <p>(And yes, I know I could/should refactor this into a parameterless constructor and a protected virtual Initialize() method. but I still wonder if I can work with constructors and still avoid copy/paste)</p>