ASP Programming Question:

Download Job Interview Questions and Answers PDF

If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor?

ASP Programming Interview Question
ASP Programming Interview Question

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 ASP Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How can you overload a method?Whats the difference between System. String and System.StringBuilder classes?