I have the following hierarchy:
class Base { public Base(string sMessage) { //Do stuff } } class Derived : Base { public Derived(string someParams) { string sMessage = 'Blah ' + someParams; //Here I want to call the base constructor //base(sMessage); } }
You have to call the base class constructor prior to the derived class constructor’s body.