Created
February 3, 2019 15:12
-
-
Save AnthonyDGreen/2ef9ba3dfcf9a1abe0e94b0cde12faf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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