Predicate(T) Delegate represents the method that defines a set of criteria
Imports System
Imports System.Drawing
Public Class Example
Public Shared Sub Main()
Dim points() As Point = { new Point(275, 395), new Point(295, 450) }
Dim first As Point = Array.Find(points, AddressOf ProductGT10)
Console.WriteLine("Found: X = {0}, Y = {1}", first.X, first.Y)
End Sub
Private Shared Function ProductGT10(ByVal p As Point) As Boolean
If p.X * p.Y > 100000 Then
Return True
Else
Return False
End If
End Function
End Class
Related examples in the same category