using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
var actions = new List<Action>();
for (int i = 0; i < 3; i++)
{
actions.Add(() => Console.Write(i));
}
foreach (var action in actions)
{
action();
}
}
}
Post #974
880
- 👍 1
- 🔥 1