see the example below
I have class A with 2 function HowAreYou and DisableValue.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim obj As New A
Dim ret As Object = obj.GetType.InvokeMember("HowAreYou", Reflection.BindingFlags.InvokeMethod, _
Nothing, obj, Nothing, Nothing)
End Sub
Private Sub ExecWithArgs()
Dim obj As New A
Dim ret As Object = obj.GetType.InvokeMember("DisableValue", Reflection.BindingFlags.InvokeMethod, _
Nothing, obj, New Object() {True}, Nothing)
End Sub
End Class
Public Class A
Public Function HowAreYou() As String
Return "Im Fine."
End Function
Public Function DisableValue(ByVal val As Boolean) As String
Return val
End Function
End Class
the function
ExecWithArgs is using arguments and have return value.
maybe this can help you