Asynchronous Programming with C# 5.0

August 12th, 2013 | Posted by Vidya Vrat in .NET | C#

Because a synchronous method call can create a delay in program flow which turns out to be bad user experience. Hence, an asynchronous approach will be better. Asynchronous method call will return immediately so that the program can perform other operations while the called method completes its work in certain situations.

The asynchronous methods behavior is different than synchronous ones. You call them; they start executing, but return the control back to the thread which called them in no time; while they continue to execute on different thread.

In general, asynchronous programming makes sense in two cases as:
• If you are creating a UI intensive application in which user experience is prime concern. In this case, an asynchronous call allows the user interface to remain responsive. Unlike shown in Figure 1-1.

  • If you have other complex or expensive computational work to do, you can continue; interacting with application UI while waiting for the response back from long running task.  Read Full Article Here…

 

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.