How is the C# Stack accessed by the CLR?
===

this might be a very simple question, but I could not find an answer here on SO nor knew anyone I asked an answer:

I can write an easy c# method like this:

    private void foo()
    {
       int a = 1;
       int b = 5;
    }

If the CIL-Code (created by the compiler) gets executed by the Common Language Runtime, it will create the following fields on top of the stack while the executing control is inside the method:

    b = 5
    a = 1
But now, I extend the Method to access the field called "a" to this:

    private void foo()
    {
       int a = 1;
       int b = 5;
       Console.WriteLine(a);
    }

Now the CLR has to access a field which is not on top of the stack, but according to the FILO (first in, last out) principle, it has to take care of all fields above the requested fields before accessing it.

What happens to the field called "b" which is on the stack above the requested field "a"?

The CLR cant delete it, as it might be used by the executing method afterwards, so what happens to it?

AFAIK, there are only 2 ways to store a field, stack or heap. Moving it to the heap would'nt make much sense as this would take all the benefits from stacking from the CLR. Does the CLR create something like a second stack?

How does that work exactly?