C# asyncallback
-
Can anyone briefly tell me how asyncallback work. How asyncallback object or variable works, especially when they are used in threading manner. Appreciate if anyone could help out
-
Can anyone briefly tell me how asyncallback work. How asyncallback object or variable works, especially when they are used in threading manner. Appreciate if anyone could help out
The AsyncCallback object is a delegate. The delegate points to a method that is called when the work finishes executing asynchronously. For example,
Action doWorkFunction = DoSomeWork;
doWorkFunction.BeginInvoke(OnDoWorkCompletedAsync, null);void DoSomeWork()
{
...
}void OnDoWorkCompletedAsync(IAsyncResult result)
{
}OnDoWorkComkpletedAsync will be called when DoSomeWork finishes asynchronously.
-
Can anyone briefly tell me how asyncallback work. How asyncallback object or variable works, especially when they are used in threading manner. Appreciate if anyone could help out
Hi, Here is a good example Regards,
Charith Jayasundara
-
Can anyone briefly tell me how asyncallback work. How asyncallback object or variable works, especially when they are used in threading manner. Appreciate if anyone could help out
Here are a few links to MSDN documentation that I found helpful. Asynchronous Programming Design Patterns [^] Asynchronous Programming Using Delegates[^] Calling Asynchronous Methods Using IAsyncResult[^] I'd advise writing a simple console app to test your new found knowledge. Good luck and enjoy!
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
Because programming is an art, not a science. Marc Clifton -
Hi, Here is a good example Regards,
Charith Jayasundara
Exactly what is the example? If you are going to respond, make sure you include links, copies of code, etc.
New feature! Scroll down to see CP offenders! Current rant: "The 50 Greatest Comedy Skits of All-Time!" http://craptasticnation.blogspot.com/[^]