mirror of
https://github.com/github/codeql.git
synced 2026-07-27 22:11:55 +02:00
8 lines
193 B
C#
8 lines
193 B
C#
var actions = new List<Fn>();
|
|
foreach (int i in Enumerable.Range(1, 10))
|
|
{
|
|
int i2 = i; // GOOD: i is not captured
|
|
actions.Add(() => Console.Out.WriteLine(i2));
|
|
}
|
|
actions.ForEach(fn => fn());
|