I don't think you can. Otherwise even 'top level' objects you create, would
really be under something else. Also, what if objectC is referenced by
multiple objectB's? Maybe in your scenario that wouldn't happen, but you can
certainly imagine the it could in another, and then what would expect to get
for the path?
Typically if an object needs to know its parent, it will have a property for
this.
"Alex" <no****@hotmail.com> wrote in message
news:43***********************@news.zen.co.uk...
Hi all...
Is there any way I can use reflection to get the complete "path" to the
current object?
So e.g. <objectA> creates <objectB> which creates <objectC>.
Then <objectB> executes a method provided by <objectC> which returns
something like "objectA.objectB.objectC".
Similarly, if <objectB> executes the same code on itself (assume it has
the same method defined as <objectC>", it would return "objectA.objectB"
Thanks!
Alex