Hello,
I have 2 classes A and B. A contains a reference to an object of type B. Depending on input from the user, an instance method objectOfTypeB.MethodB() is called, where objectOfTypeB is a field in the instantiated object objectOfTypeA.
I want that every time MethodB gets called on objectOfTypeB, a corresponding method, MethodA, gets also called on objectOfTypeA.
So, how can I get, inside objectOfTypeB.MethodB(), the reference to the "creator" of objectOfTypeB, that is, objectOfTypeA?
Thank you.