public class Test
public Shared Sub Main
Dim m_DisplayStringRoutine As StringDisplayerType
m_DisplayStringRoutine = AddressOf ShowStringInMessageBox ' ShowStringInOutputWindow
m_DisplayStringRoutine("Hello world")
End Sub
Private Delegate Sub StringDisplayerType(ByVal str As String)
Private Shared Sub ShowStringInOutputWindow(ByVal str As String)
Console.WriteLine(str)
End Sub
Private Shared Sub ShowStringInMessageBox(ByVal str As String)
Console.WriteLine("+++"+str)
End Sub
End class
|