i in for(int i = 1; i <= 10; i++) is the same variable in each loop, just changing the value.
() => i is a closure. When it is called, it uses the current value of i , not the value that i had when creating Func .
First, you list GetFunctions before calling the returned functions, so i already 11 in each of them.
If you call functions immediately after receiving them from the counter, you will get the same results as in the LINQ version:
foreach (var f in GetFunctions()) Console.WriteLine("[YIELD2] {0}", f());
In any case, it is not recommended to create closures on loop variables.
source share