title: C# Error: Parent does not contain a constructor that takes 0 arguments
body: <p>My code is</p>
  
  <pre><code>public class Parent
  {
  
      public Parent(int i)
      {
          Console.WriteLine("parent");
      }
  }
  
  public class Child : Parent
  {
      public Child(int i)
      {
          Console.WriteLine("child");
      }
  
  }
  </code></pre>
  
  <p>I am getting the error:</p>
  
  <blockquote>
    <p>Parent does not contain a constructor that takes 0 arguments.</p>
  </blockquote>
  
  <p>I understand the problem is that <code>Parent</code> has no constructor with 0 arguments. But my question is, why do we need a constructor with zero arguments? Why doesn't the code work without it?</p>