No, you can’t. There is no inheritance of constructors. The constructor in Bardoes something: it provides an argument to the base constructor, using its own parameter for this argument. There is no way to do this automatically.
The only constructor that the compiler will automatically provide you with is equivalent:
public Bar() : base()
{
}
for a particular class or for an abstract class:
protected Bar() : base()
{
}
... and this is provided only if you do not provide any other constructors explicitly.
source
share