Contents tagged with Closures
today I want to share piece of wisdom which is interesting, but hard to explain why somebody may need it. That is how closures are implemented.
Consider the following code:
static void Main(string args)
int a = 54;
Task t = new Task(
Now you may wonder, how a will be passed to closure? How Console.WriteLine will be executed?
For my surprise .Net for closures generates behind the … more