Friend Class _Closure
Public Sub New()
End Sub

Public Sub New(ByVal other As _Closure)
If (Not other Is Nothing) Then
	Me._maxPlayers = other._maxPlayers
End If
End Sub

Public Function _Lambda_1(ByVal customer As Customer) As Boolean
	Return (customer.Sports.Count > Me._maxPlayers)
End Function

Public _maxPlayers As Integer
End Class

' Pedchoz kd roziuje metoda Main.
Module Demo
Private Shared Function _Lambda_2(ByVal customer As Customer) As String
	Return customer.Name
End Function

Sub Main()
Dim customers As Customer() = ... ' inicializace zkaznk

' Dal dva dky odpovdaj dku "Dim maxPlayers = 2".
Dim _ClosureVariable As New _Closure
_ClosureVariable._maxPlayers = 2

Dim players = _
	Enumerable.Select( _
Enumerable.Where(customers, _
AddressOf _ClosureVariable._Lambda_1), _
		AddressOf _Lambda_2)
'...
End Sub
End Module
