Declaring Asynchronous Methods
The declaration of an asynchronous method is easy and simply involves adding an
async modifier. You can combine this modifier with other modifiers such as
static, the accessibility modifiers, and so on. Figure 31.16 shows a couple of valid asynchronous method declarations.
Notice how an
Async suffix is added to the methods to conform with the TAP guidelines. This is merely a convention that isn’t checked by the compiler, but can be checked by code analysis tools.
A few restrictions apply to asynchronous methods. One is the set of allowed return types, restricted to ...