How to call an ancestor base class method ?

  • Thread starter Thread starter cadilhac
  • Start date Start date
C

cadilhac

Hi,

I have a class C derived from B which is derived from A.
In an overriden method of C, I would like to call the same base method
but in A.
Using the keyword "base" performs the call in B but hoz can I call the
method in A ? Is there a language construct for this ?
Thank you

Herve
 
If B has overridden the method then there is no way for C to invoke A's version directly

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hi,

I have a class C derived from B which is derived from A.
In an overriden method of C, I would like to call the same base method
but in A.
Using the keyword "base" performs the call in B but hoz can I call the
method in A ? Is there a language construct for this ?
Thank you

Herve
 
I have a class C derived from B which is derived from A.
In an overriden method of C, I would like to call the same
base method but in A.
Using the keyword "base" performs the call in B but hoz
can I call the method in A ?

Add a method to B that calls the method in A.
C is derived from B, not A, so it does not really know about A.

P.
 
Back
Top