A delegate is defined via the
Delegate keyword followed by the method signature it needs to implement. Such a signature can be referred to as a
Sub or as a
Function and might or might not receive arguments. The following code defines a delegate that can handle a reference to methods able to check an email address, providing the same signature of the delegate:
Public Delegate Function IsValidMailAddress(ByVal emailAddress _ As String) As Boolean
Delegates Support Generics
Delegates support generics, meaning that you can define a
Delegate Function DelegateName(Of T) or
Delegate Sub DelegateName(Of T).
IsValidMailAddress is a type and not ...