Saturday, 2 May 2020

Ques: Abstract class without constructor in C#?

The compiler provides a "Protected Parameterless Constructor" for an abstract class C# program. We know that in an inheritance hierarchy if we create an object of a child class, first base class and then child class constructor will be called.  
Hence, if the base class does not contain any constructor, the compiler provides protect parameterless constructor.

No comments:

Post a Comment