J
Jon Slaughter
Is it possible to get the name of an instance of an object?
I want to display it for debugging purposes but don't have a clue about how
to go about it.
i.e., I want something like(psuedo)
Class A { }
main
{
A B;
writeline("{0}", B.Name());
}
and it display B.
I know I could just simply display B but if I end up changing the instance
name then I would necessarily know where to update it then. I could
refactor/search and replace ofcourse but it seems better to put it in code.
Thanks,
Jon
I want to display it for debugging purposes but don't have a clue about how
to go about it.
i.e., I want something like(psuedo)
Class A { }
main
{
A B;
writeline("{0}", B.Name());
}
and it display B.
I know I could just simply display B but if I end up changing the instance
name then I would necessarily know where to update it then. I could
refactor/search and replace ofcourse but it seems better to put it in code.
Thanks,
Jon