Are you asking how to write a lambda expression ?
A lambda expression is a function or subroutine without a name that can be used wherever a delegate is valid. Lambda expressions can be functions or routines and can be single-line or multi-line. You can pass values from the current region to a lambda expression.
-, Function Sub, , . - .
, "Hello World!":
Dim outputString As Action(Of String) = Sub(x As String)
Console.WriteLine(x)
End Sub
outputString("Hello World!")
. : VB.NET Lambda Expression