Click here to Skip to main content
15,889,527 members
Articles / Programming Languages / C#

Employing Tasks to Handle Events in the .NET Framework

Rate me:
Please Sign up or sign in to vote.
4.64/5 (11 votes)
4 Jun 2018CPOL5 min read 13.5K   130   20  
This piece shows that, by returning a Task from an Event Handler instead of the usual void, the management of the event can be more structured and versatile.
This article explains how to utilize Tasks for managing asynchronous events in the .NET Framework, including returning Tasks from control-based events, managing Task-based events in the ViewModel, canceling Tasks returned from events, and an example application demonstrating these concepts.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Student
Wales Wales
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions