CSharp - What is the output: sealed constructor

Question

What is the output from the following code

class A
{
        sealed A()
        { }
}


Click to view the answer

Compile time error

Note

The keyword sealed is used to prevent overriding but constructors cannot be overridden.

To prevent a constructor from being called by its derived classes, mark it private.

Constructors aren't inherited by a child class.

We need to explicitly call a base class constructor if needed.

Related Quiz