Results 1 to 3 of 3

Thread: RESOLVED - Dynamic method ..

  1. #1

    Thread Starter
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456

    RESOLVED - Dynamic method ..

    Can somebody post an example of how to call a procedure or function dynamically using system.reflection ?? I have seen lot of people talking about it but yet to see how it works ... anybody ?
    Last edited by techyspecy; Sep 30th, 2004 at 09:34 AM.

  2. #2

    Thread Starter
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456

  3. #3

    Thread Starter
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456
    VB Code:
    1. Private Sub LoadAndInvoke()
    2.         Dim t As Type = Me.GetType
    3.         t.InvokeMember("MyMessage", Reflection.BindingFlags.InvokeMethod, Nothing, Me, Nothing)
    4.     End Sub
    5.  
    6.     Public Function MyMessage() As Boolean
    7.         MessageBox.Show("I was Dynamically executed !")
    8.     End Function
    works ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width