How do I get the address of the "me"  object in

Posted on 2007-07-29
Last Modified: 2013-11-26
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#?
Question by:cschene
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    To what end?...are you passing the instance to a C/C++ DLL for instance?
    LVL 24

    Expert Comment

    Are you sure you aren't looking for the handle for the form? me.handle might be what you want.

    Author Comment

    "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.
    LVL 85

    Accepted Solution

    So setup a "name" field and give each instance a name as you create it.  You can simply increment a counter and add that to the end of ~something~...

    Author Comment

    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

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now