How it works...

When the Windows form opens up for the first time, you will see that the timer label defaults to Timer Stopped. Click on the Copy Files Async button to start the copy process:

When the application has finished processing, you will see that the large files have been copied to the destination folder:

While the copy process is running, your Windows form remains active and responsive. The timer label also continues to count. Usually, with processes such as these, the form would be unresponsive:

When the files have finished copying, ...

Get C# 7 and .NET Core Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.