Tag Archives: foreach

Delegate In Foreach Iteration Bug – Solution


When declaring delegates (anonymous methods) inside of foreach loop, the container only get the last delegate calculated.
The reason is that the foreach loop is designed to reuse declared variables, in our case the delegate is used as a type declared before the loop and reused.

Read the rest of this entry »


Tags: , , , , , ,