C# class and constructor โ€“ programs for practice

Q) What is output of C# code? class Base { public Base() { Console.WriteLine(“Base class constructor”); } } class Child : Base { public Child() { Console.WriteLine(“Child class constructor”); } } class Program { static void Main(string[] args) { Child c = new Child(); } } [su_spoiler title=”View Answer” style=”fancy” icon=”folder-2″] Output: Base class constructor … Read more C# class and constructor โ€“ programs for practice