The abstract modifier in a class declaration is used to indicate that a class is intended only to be a base class of other classes, not instantiated on its own.
Since abstract classes cannot be instantiated, there is no need for public or internal constructors. If
there is basic initialization logic that should run when an extending class instance is created, you can add it in a private,
private protected or protected constructor.
Restrict the constructor visibility to the minimum: private, private protected or protected, depending on
the usage.
abstract class Base
{
public Base() // Noncompliant: should be private, private protected or protected.
{
//...
}
}
abstract class Base
{
protected Base()
{
//...
}
}