How to declare callback function and pass as paramater to function

alanlau

New member
Joined
Sep 23, 2014
Messages
3
Programming Experience
10+
I'm using a function in a third-party DLL library that takes a callback function as a parameter. The library was written and C#, but it seems to be perfectly compatible with VB. The only problem I'm having is figuring out how to pass one of the functions a callback function. Here is how the function is declared:

VB.NET:
public void DownloadFile(string path, Stream output, Action<ulong> downloadCallback = null)

So I'm assuming it wants a function with a single unsigned long parameter. Any ideas?
 

Latest posts

Back
Top