class Program
{
static Action act = null;
static void Main(string[] args)
{
Test();
act();
act();
Test();
act();
}
static void Test()
{
int count = 0;
if(act == null) act = () => Console.Write(++count + " ");
}
}
result : 1 2 3
why?
if delete
[ if(act == null)
]
result : 1 2 1