C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Then: The List.Find Function is used to find the first 3-letter String in the List instance.
List Find, ExistsAddressOf: The AddressOf operator is used and it references the IsThreeLetters Function. We display the result.
ConsoleVB.NET program that uses AddressOf
Module Module1
Function IsThreeLetters(ByVal value As String) As Boolean
Return value.Length = 3
End Function
Sub Main()
Dim list As List(Of String) = New List(Of String)
list.Add("mouse")
list.Add("horse")
list.Add("dog")
Dim value As String = list.Find(AddressOf IsThreeLetters)
Console.WriteLine(value)
End Sub
End Module
Output
dog
And: It tells you that the method name is just used to acquire a memory address.