4/6 In C++, if there are several instances of an object, and for
debugging purpose I want to see which instance of an object it is, I
can do 'printf("%p", pObj);' to print out the address of the object.
Is there any way to do something similar in C#? Thanks.
\_ CLR objects can get shuffled around in memory nondeterministically.
Using the address or something like that won't work for identifying
an object. You need an object identifier, a UID or something
explicitly in the object to follow it.
\_ How do I get an object ID that I can print out? Thanks.
\_ How do I get an object ID that I can print out? Thanks. -- OP
\_ You need to set it, probably when you instantiate it.
\_ I see. Thx. -- OP |