Using Async for File Access (Alan Berman)
Posted by: C# Frequently Asked Questions,
on 23 Jan 2012 |
View original | Bookmarked: 0 time(s)
The new Async feature in Visual Studio makes it easy to code asynchronous method calls. To make synchronous code asynchronous, you can simply call an asynchronous method instead of a synchronous method and add a few keywords to the code, as shown in the examples below. You no longer need to define continuations to capture what happens when the asynchronous operation finishes, which can otherwise complicate the code.
Even with the simplicity, why make file access calls asynchronous? Aren't...