Asked By
nadeemrao
0 points
N/A
Posted on - 08/09/2011
I have a base class in which a bunch of constructors are overloaded.
Another class derived from the base class also has a bunch of overloaded constructors.
How can I enforce a call function from an inherited constructor to an arbitrary base constructor?
How to inherit base constructor?
Just place the colon tract then insert the keyword "base term bottom" inside the constructor in the inherited class.
Answered By
tariq
0 points
N/A
#92855
How to inherit base constructor?
In order to deal with this kind of situation, you will have to inherit your constructors from base class.
In this case, you will be able to restrict your methods from being over-ridden.
I do not think that there are any other ways to handle this except as described here.
-
Put a colon sign after inherited class constructor and specify base class constructor there.