I’m new to using inherited classes, so I may be missing something completly obvious. I have two classes, A and B, that both inherit some other class Z. Class Z has a number of methods etc.
What I’m trying to figure out is how to create an event (or just some method) in class A and B that is triggered after some method in class Z finishes…
Is there a way to do that?
Cheers
Using abstract methods:
Subclasses override abstract method from base class.
Calling base by convention:
Override virtual methods from base class & invoke base method at the beginning
Delegate injection:
Require a delegate in the superclass constructor. Invoke the delegate.
Event Subscription:
Fire an event when the action happens. Other classes subscribe to the event