Option Strict On
Imports System.Collections.Generic
Module Program
Sub Main()
Dim list As New List(Of Integer)()
list.AddRange(New Integer() {20, 1, 4, 8, 9, 44})
Dim evenNumbers As List(Of Integer) = list.FindAll(Function(i As Integer) (i Mod 2) = 0)
For Each evenNumber As Integer In evenNumbers
Console.WriteLine(evenNumber)
Next
End Sub
Function IsEvenNumber(ByVal i As Integer) As Boolean
Return (i Mod 2) = 0
End Function
Sub LambdaExpressionSyntax()
End Sub
End Module
|