You must Sign In to post a response.
  • Category: .NET

    When do we use async class in c#.net

    When do we use async class in c#.net ? which scenario will use Async calls and Await also
  • #762476
    Hello Praveen,

    Async class can use when an Applications that perform many tasks simultaneously, yet remain responsive to user interaction, often require a design that uses multiple threads. Such as Facebook messenger which works on website and in app also where you can access same chats.

    Go through the below links for more reference on Asynch and Await :

    https://msdn.microsoft.com/en-us/library/hh191443.aspx

    http://www.codeproject.com/Tips/591586/Asynchronous-Programming-in-Csharp-using-async


    Hope this will help you.

    Regards,
    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #762493
    Hi

    Async programming is highly faster when compared to normal programming with normal classes normal methods.
    It takes time for a normal method to return result.

    Async methods will contain Task<datatype> as return type.

    async Task<int> some_Method()
    {
    int i=10;
    return i;
    }

    Go through below links for more reference
    http://www.dotnetperls.com/async

    Sridhar Thota.
    Editor: DNS Forum.


Sign In to post your comments