Local Variables No Longer Exclusively on the Stack

Sometimes things that everyone just knows aren't always true.

For example, when I look at c# code, I know that local variables are stored on the stack.  Or, I thought I knew that.

However, Ian Griffiths notes that in .NET 2.0, this isn't neccessarily true.  This change was made to support anonymous methods, and mutability of variables in the enclosing scope.

Time for me to 'unlearn' a few things.

 

1 Comment

Comments have been disabled for this content.