I need to call a base class method when you call overriden one (e.g. callor base). For instance:
class A { public void Fun() { Console.Write("Class A!"); } } class B : A { public void Fun() { Console.Write("Class B!"); } }
I want to see on the screen
Class A! Class B!
when executing the following code:
B b = new B(); b.Fun();
Can someone tell me, please, what needs to be changed in the code example or what is the best way to write in order to get the required result? Thanks.
source share