
Pointer address and memory window problem
Yawen,
In .NET you don't have access to pointers, only to references. The
garbage collector can move memory around at will, so even if you had a
location in memory that held an object, there is no guarantee that it will
be there later on.
Is there a reason that you need direct memory access?
--
- Nicholas Paldino [.NET/C# MVP]
Quote:
> I'm new to the .net environment and I'm using the language C#. I have
some
> pointers in my application and when I debug it, I want to look at both the
> address and the contents of the pointers in the memory window. However,
> under the Watch window, the Value column shows only the data type of my
> pointer when the Visual Studio 6 would should the address (in hex) of the
> pointer. When I drag and drop that pointer to the memory window, nothing
> can be displayed.
> Does someone know what I did wrong and how to fix this problem?
> Thanks a lot.
> Yawen