What is the output from the following code
using System; class ParentClass { private ParentClass() { } public void ShowClassName() { Console.WriteLine("Inside Parent.ShowClassName"); } } class ChildClass : ParentClass //Error { //Some code }
the program will give you a compilation error.
If a class has only private constructors, it cannot be sub classed.