I am currently teaching at a computer science college, and recently we saw how to get the memory addresses of variables with and and * in the debugger. My teacher said that variables of type local value are on the stack and the reference type is on the heap. But he also said that the stack should contain the address where the lines are on the heap.
I do not know if you understand what I am trying to say, but it should be possible because I saw it in the notes that he gave us. But when he tried to show us, it did not work, and he did not know why.
I want to know how to do this, but when I try, I always get this error message:
It is not possible to accept an address, get a size, or declare a pointer to a managed type ('string').
I write &nameofstringvariablewithout quotes in the debugger. I like to understand how everything works, and I was looking for a watch on Google for this problem, but I never found a solution. I tried the code unsafeand it did not work.
source
share