Link to home
Start Free TrialLog in
Avatar of Christopher Schene
Christopher ScheneFlag for United States of America

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#?
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

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.
Avatar of Christopher Schene

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.
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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