Hi,
Doing this in a console program:
object x = new string(new char[0]);
If one set a breakpoint rigt after x's assignment and bring up the quick watch window, what is the debugger displaying for &x? I was expecting x's address but it looks like I'm wrong?
EDIT: I'm asking this because of another thread, which was pointing out that if one do
object x = new string(new char[0]);
object y = new string(new char[0]);
x and y will reference the same object. As I wanted to check it out, I tried inspecting these variables' addresses in the debugger using the & operator and, at first, I had the impression they were different. But, after expanding the result, second level values do match - so these seem to be "real addresses".