Christopher Schene
asked on
How do I get the address of the "me" object in vb.net?
Hi, I am in a class and I want to get the address of the "me" object class instantiation.
How do I do that? I tried "addressOf me" and the compiler does not seem to like it
Hiow do I do the same thing in C#?
How do I do that? I tried "addressOf me" and the compiler does not seem to like it
Hiow do I do the same thing in C#?
To what end?...are you passing the instance to a C/C++ DLL for instance?
Are you sure you aren't looking for the handle for the form? me.handle might be what you want.
ASKER
"To what end?...are you passing the instance to a C/C++ DLL for instance?"
I am working with multiple instatiations of a given class and I am looking for a way, in my logs files, to distinguish one instatiation from another. I don't really need the address, I suppose, just a way of distinguishing one object from another in the logs.
I am working with multiple instatiations of a given class and I am looking for a way, in my logs files, to distinguish one instatiation from another. I don't really need the address, I suppose, just a way of distinguishing one object from another in the logs.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
They didn't really answer my question and adding the name or id field was something I had already thought of.
I did not realize that addresses are not really meaningful in the CLR, since I think the CLR may actually move the objects around to defragment the memory.
I'll give the points to idle mind
I did not realize that addresses are not really meaningful in the CLR, since I think the CLR may actually move the objects around to defragment the memory.
I'll give the points to idle mind