I can\'t understand how to loop through an Action list. When I try it, I end up with the values being the same as the previous iteration.
Action
Here\'s the co
Your action is a closure, therefore it accesses str itself, not a copy of str:
str
foreach (string str in strings) { var copy = str; // this will do the job actions.Add(new Action(() => { Trace.WriteLine(copy); })); }