Calling virtual functions ancestor class in C#

  • Thread starter Thread starter Alexander Vasilevsky
  • Start date Start date
Alexander,

You can only call the implementation in the base, no further up in the
hierarchy. You would use the base keyword, like so:

base.VirtualFunction();

VirtualFunction is the virtual function name to call the base class
implementation of.
 
Hi,

You can use base.YourMethod();

note that you can ONLY call the one inmediately above the class, there is
no way to call the "grandparet" method
 
Back
Top