Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Module Program
Sub Main()
Dim lambdas = New List(Of Action)
For i = 1 To 3
Dim x As Integer
x -= 1
lambdas.Add(Sub() Console.WriteLine(x))
Next
For Each lambda In lambdas
lambda()
Next
End Sub
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.