title: Constructor calling hierarchy during inheritance-both with and without parameters
body: <p>First of all this is not a duplicate question.</p>
  
  <p>I know the facts that:</p>
  
  <ul>
  <li>During inheritance, the order of execution of constructors will be in the same order as their derivation and order of execution of destructors will be in reverse order of their derivation.</li>
  <li>Also, we can call base class constructor explicitly using <code>base</code> keyword in constructor definition.</li>
  </ul>
  
  <p><strong>My question is</strong> :
  For my below code</p>
  
  <pre><code>class ClassA
  {
      public ClassA(int a)
      {
          Console.WriteLine("Parameterized Constructor of ClassA");
      }
  }
  class ClassB : ClassA
  {
      public ClassB(int a)
      {
          Console.WriteLine("Parameterized Constructor of ClassB");
      }
  }
  class ClassC : ClassB
  {
      public ClassC(int a)
      {
          Console.WriteLine("Parameterized Constructor of ClassC");
      }
  }
  
  class Program
  {
      static void Main(string[] args)
      {
          ClassC classc = new ClassC(1);
          Console.ReadLine();
      }
  }
  </code></pre>
  
  <p>I am getting the complie time error:</p>
  
  <pre><code>'ClassA' does not contain a constructor that takes 0 arguments
  'ClassB' does not contain a constructor that takes 0 arguments
  </code></pre>
  
  <p>But when I Add the default constructors to both the classes as :</p>
  
  <pre><code>class ClassA
  {
      public ClassA()
      {
          Console.WriteLine("Default Constructor of ClassA");
      }
      public ClassA(int a)
      {
          Console.WriteLine("Parameterized Constructor of ClassA");
      }
  }
  class ClassB : ClassA
  {
      public ClassB()
      {
          Console.WriteLine("Default Constructor of ClassB");
      }
      public ClassB(int a)
      {
          Console.WriteLine("Parameterized Constructor of ClassB");
      }
  }
  class ClassC : ClassB
  {
      public ClassC()
      {
          Console.WriteLine("Default Constructor of ClassC");
      }
      public ClassC(int a)
      {
          Console.WriteLine("Parameterized Constructor of ClassC");
      }
  }
  
  class Program
  {
      static void Main(string[] args)
      {
          ClassC classc = new ClassC(1);
          Console.ReadLine();
      }
  }
  </code></pre>
  
  <p>I got the output as expected.</p>
  
  <pre><code>Default Constructor of ClassA
  Default Constructor of ClassB
  Parameterized Constructor of ClassC
  </code></pre>
  
  <p><strong>SO does this means, During inheritance all base classes needs a parameterless constructor</strong>.</p>
  
  <p>I didn't get any clear explanation for this yet. Please dont make this as duplicate and any good explanation is appreciated.</p>