With acync and await, developers can keep their applications fully responsive while performing intensive tasks such as file processing. This makes a perfect candidate for using asynchronous code. If you have several large files that need copying, an async and await method would be a perfect solution for keeping your form responsive.
Async and await file processing
Getting ready
Ensure that you have added the following using statements to the top of your code file:
using System.IO;
using System.Threading;
For asynchronous code to work, we need to include the threading namespaces.
How to do it...
- Create two folders...