Jan 11, 2011 at 3:23 AM

What is the different between AsyncAction & other AsyncFunc classes? Any example on how to make use of AsyncAction?


Jan 14, 2011 at 10:32 PM

I'm very happy to hear that this library has drawn someone's attention. As for your question, AsyncAction and AsyncFunc are almost the same by design. They correspond to Action<T> and Func<T,TResult> generic delegates. AsyncFunc encapsulates a method that can optionally take some parameters but always returns a result. AsynAction on the other hand encapsulates a method which doesn't return anything (void). You can use it in scenarios where you are interested only in completion event. When it is raised, you know exactly what to do without any additional information (Result).

You can read about Action<T> and Func<T,TResult> at:

Hope this will help and encourage you to further experiment with AsyncFunc library.