Ok, This question is not exactly a programming question but this is what can really make programming more practical and easy to implement.
This question is coming out beacuase each-time I write int c=10; or MyClass objMyClass=new MyClass(); I want to see where in the memory the value has been created (Though We can see the address as an Hex Value now) .
Can we see (when we declare a variable) Where it is being created in the Memory? In which state i.e : C#->IL->Machine Language, is the variable present in the memory.Now how different events and functions update it’s value. This is just something like my CPU emulator.
I am asking because this question was popping in mind long time? When ever I get to know a new concept , the reflex is , Ok How does it look in the memory.
You can see all this and more if you load the SOS.dll (or PSSCOR2.dll) extension into WinDbg or even into Visual Studio.
SOS is a part of the .NET framework and it basically turns a native debugger such as WinDbg into a "managed code aware" debugger.
SOS has commands that will let you inspect the managed heap, objects and their references and so on.
For more information see Tess’ excellent blog.
For another example of how to use SOS see this question.