Skip to content

Instantly share code, notes, and snippets.

@DexterHaslem
Created November 12, 2013 18:01
Show Gist options
  • Save DexterHaslem/7435675 to your computer and use it in GitHub Desktop.
Save DexterHaslem/7435675 to your computer and use it in GitHub Desktop.
Action[] a = new Action[3];
for (int y = 0; y < a.Length; y++)
a[y] = new Action(() => Console.WriteLine(y));
for (int y = 0; y < a.Length; y++)
a[y]();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment