C# – Lambda expressions and access to modified closure

When I use Lambda expressions, I find out a strange and unexpected behavior. Let’s consider the following example What are we waiting for when calling Print(CreateExample1())? An output with “0, 1, 2, 3”? The answer is no. When we compile and run the code above we will have a black screen with array of “4,… Continue reading C# – Lambda expressions and access to modified closure