hi
we are facing a problem to call the parent class constructor in child class
Loading
Know the answer? Post it. Somebody with the same question will find it here.


Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Posted Jan 22, 2012, 7:18 PM EST
public class Parent { public Parent() { Console.WriteLine("Parent Constructor called"); } public Parent (string message) { Console.WriteLine(message); } public void Display() { } } public class Child : Parent { public Child() : base() { Console.WriteLine("Child Constructor called"); } public Child(string message) : base(message) { Console.WriteLine("Child Constructor called"); } }