VB.NET function that takes other functions as a parameter, and executes them
Posted
by rob
on Stack Overflow
See other posts from Stack Overflow
or by rob
Published on 2010-04-29T01:09:12Z
Indexed on
2010/04/29
1:27 UTC
Read the original article
Hit count: 347
Hello,
Is there a way in vb.net to create a sub/function that will take as an argument some kind of pointer to another function, and allow this new sub/function to execute the passed function?
What I have are 10-12 xml-rpc functions I am calling against a remote server. Each of these functions has different argument lists (one takes 1 string, another might take 3 strings and one int, etc). All of them return an object.
As I am calling these, it seems like it should be able to be factored better. For instance, everytime I call any of these functions, I want to test the return value for a session drop, and do something to try and reconnect to the remote system, etc.
Using .net 3.5
Thanks!
-R
© Stack Overflow or respective owner