I understand your point about closure being a potential issue with ForEach but if my delegate code is simple, the ForEach looks cleaner. Eric, I would be interested in any comments you may have about this re factoring. RJ Anonymous May 19, 2009 @RJ Create actions that work on a single...
I understand your point about closure being a potential issue with ForEach but if my delegate code is simple, the ForEach looks cleaner. Eric, I would be interested in any comments you may have about this re factoring. RJ Anonymous May 19, 2009 @RJ Create actions that work on a single...
Doing this lets you rewrite this perfectly clear code: foreach(Foo foo in foos){ statement involving foo; } into this code: foos.ForEach((Foo foo)=>{ statement involving foo; }); which uses almost exactly the same characters in slightly different order. And yet the second version is ...