Delegate Test
23-Sep-0909 Leave a comment
Imports Microsoft.VisualBasic.CallType
Public Class TestJump
Inherits Test
Delegate Sub T()
Public Overrides Sub RunTest()
Try
'Call TestBack()
Dim st As New StackFrame
Me.Name = st.GetMethod.ReflectedType.Name
Dim op As T = AddressOf TestBack
op.Invoke()
Call TestDelegate(AddressOf TestMe.TestBack)
Me.Result = True
Catch ex As Exception
Me.Result = False
Me.FailMessage = ex.Message
End Try
End Sub
Private Sub TestDelegate(ByVal op As T)
op.Invoke()
End Sub
End Class
Module TestMe
Public Sub TestBack()
Debug.Print("Here123")
'Debug.Close()
End Sub
End Module