... edit #1 ...
The OP asked why case #4, in which both base class and derived class each have one constructor with matching parameter signatures, will not compile, throwing an error message: "does not contain a constructor that takes 0 arguments."
In case #4, the constructor in the derived class does not call :base(a) ... so ... the compiler looks for a parameterless constructor for the base class, and throws an error when it does not find one.
imho, here is a case where the "why" of how C# behaves reflects the
choices of the language designers, just as allowing a base class with no constructors, and only function definitions ... as shown below ... to work fine with all derived classes no matter what constructors they implement is a design choice.
Whether we like it or not, whether we call such design choices "arbitrary," or "enlightened," love them, or hate them: that's the way the language works.
... end edit #1 ...
I would explain this in two ways: consider this definition of 'Baseclass:
public class Baseclass
{
public double hyp(int x, int y)
{
return (Math.Sqrt((x * x) + (y * y)));
}
}
Here there are no (formal) constructors defined. Any class that inherits from 'Baseclass can define constructors (as many as you like) with different numbers of parameters:
public class Derivedclass: Baseclass
{
public double hypo { get; set; }
public Derivedclass(int x, int y)
{
hypo = this.hyp(x,y);
}
}
Notice here that there is no call to :base in the definition of 'Derivedclass. In essence, 'Baseclass acts as a repository for a function 'hyp: and, as you see, the function can be invoked without calling a constructor in 'Baseclass in the usual way.
Once you start using calls to :base in a derived class, then, in general, you should make sure you have constructors in the base class whose signature match each of the constructors in 'Derivedclass, and, as you found out, you must provide a parameterless constructor in 'BaseClass.
What you put in a base class, what data, what methods, should be carefully selected to meet the needs of your application. Having what appears to be a never-used parameterless constructor hanging there, in the base class, will not burn-up your cpu !
Let's just say that, like a good parent, a base class, at times, yearns to hear from its children :)