Module Module1
Sub Main()
Dim list As List(Of Integer) = New List(Of Integer)({20, -1, 3, 4})
' See if a negative number exists.
Dim result = list.Exists(Function(value As Integer)
Return value < 0
End Function)
Console.WriteLine(
"EXISTS: {0}", result)
' See if a huge number exists.
result = list.Exists(Function(value As Integer)
Return value >= 1000
End Function)
Console.WriteLine(
"EXISTS: {0}", result)
End Sub
End Module
EXISTS: True
EXISTS: False