J
JB
In general, when writing vb code a method is called by adding the name of the
method at the relevant point in the code
Private Sub Sub1()
...
...
Sub2()
...
End Sub
Private Sub Sub2
....
End Sub
My question is whether or not there is a way of doing the same thing except
that the name of the sub is a string or put another way, the method to be
called is not know until runtime. Somthing like
Private Sub Sub3
...
Exec( "Sub2")
...
End Sub
I use reflection to create classes at runtime based on a string name using
GetType and Activator.CreateInstance. It there something equivalent for
invoking a method when the name isn't know until runtime?
method at the relevant point in the code
Private Sub Sub1()
...
...
Sub2()
...
End Sub
Private Sub Sub2
....
End Sub
My question is whether or not there is a way of doing the same thing except
that the name of the sub is a string or put another way, the method to be
called is not know until runtime. Somthing like
Private Sub Sub3
...
Exec( "Sub2")
...
End Sub
I use reflection to create classes at runtime based on a string name using
GetType and Activator.CreateInstance. It there something equivalent for
invoking a method when the name isn't know until runtime?