I have this code:
class Parent
{
public Parent(string someArg)
{
Console.WriteLine("Parent");
}
}
class Child : Parent
{
public Child(string someArg)
{
Console.WriteLine("Child");
}
}
which I then instantiate:
var child = new Child("something");
gets me an error. I know it has to do with the parent constructor, but I'm not sure why is this the case. Am I required to use base
every time I have a constructor in the parent which is not parameter-less? Why?