Which C# keyword calls a constructor of the base class from a derived class constructor?
Correct answer D. base
Explanation
In C#, a derived constructor chains to a base constructor with an initialiser: public Dog(string name) : base(name) { }. The base keyword also calls overridden members, as in base.ToString(). super is the Java keyword. this(...) chains to another constructor of the same class. Without an explicit initialiser, the base class's parameterless constructor is called.
Answer checked How we write and check questions
Discussion