I have two classes that are already subclasses of a different parent (due to an external library I cannot change this). However I want to share some common code between them, say for example, code that handles an action after a popup dialog etc. How do I do this?
Share
Refactor the shared code into its own class, and include an instance of that class as a field/property within your other two classes.