C# (Sharp) Programming Language Question:
Download Job Interview Questions and Answers PDF
If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?
Answer:
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
Download C# (Sharp) Programming Language Interview Questions And Answers
PDF
Previous Question | Next Question |
What are the different ways a method can be overloaded? | What is a C# delegate? |