C#: Trouble with Lambdas in For Loops
I had an interesting bug the other day. I wrote a foreach loop along these lines: foreach (var entry in controlsByName) { entry.Key.SomeEvent += (sender,args)=>{ProcessControlName(entry.Value);} } Looks innocent enough, […]