Is this possible!!?!?!?!?
I\'m trying to make a set of classes that model a number of different types of things. Properties of these things change over time, and I want
Given the question as is, It is would be very hard, if not impossible, to do so.
With debugging symbols, it is possible to dig up through stack frames and enumerate the local variables and match the address with the instance address. However, the approach won't work because the constructor will be invoked before the reference got set, so the tiger
will be null at the time and matching will fail all the time.
Yet if I can alter the question, the solution might be that you need to call MAGICSTUFF.GetInstanceName(this);
in getter method of CatName
instead, so my approach should be working fine.
Now I'm trying to writing some code to do so, though I would post it here if someone might read this and come up with the real implementation before me.