diff --git a/docs/standard/asynchronous-programming-patterns/implementing-the-task-based-asynchronous-pattern.md b/docs/standard/asynchronous-programming-patterns/implementing-the-task-based-asynchronous-pattern.md index e85ba8a08d6ba..7cdead1f8fc80 100644 --- a/docs/standard/asynchronous-programming-patterns/implementing-the-task-based-asynchronous-pattern.md +++ b/docs/standard/asynchronous-programming-patterns/implementing-the-task-based-asynchronous-pattern.md @@ -18,7 +18,7 @@ You can implement the Task-based Asynchronous Pattern (TAP) in three ways: by us ## Generating TAP methods ### Using the compilers -Starting with .NET Framework 4.5, any method that is attributed with the `async` keyword (`Async` in Visual Basic) is considered an asynchronous method, and the C# and Visual Basic compilers perform the necessary transformations to implement the method asynchronously by using TAP. An asynchronous method should return either a or a object. For the latter, the body of the function should return a `TResult`, and the compiler ensures that this result is made available through the resulting task object. Similarly, any exceptions that go unhandled within the body of the method are marshaled to the output task and cause the resulting task to end in the state. The exception is when an (or derived type) goes unhandled, in which case the resulting task ends in the state. +Starting with .NET Framework 4.5, any method that is attributed with the `async` keyword (`Async` in Visual Basic) is considered an asynchronous method, and the C# and Visual Basic compilers perform the necessary transformations to implement the method asynchronously by using TAP. An asynchronous method should return either a or a object. For the latter, the body of the function should return a `TResult`, and the compiler ensures that this result is made available through the resulting task object. Similarly, any exceptions that go unhandled within the body of the method are marshaled to the output task and cause the resulting task to end in the state. The exception to this rule is when an (or derived type) goes unhandled, in which case the resulting task ends in the state. ### Generating TAP methods manually You may implement the TAP pattern manually for better control over implementation. The compiler relies on the public surface area exposed from the namespace and supporting types in the namespace. To implement the TAP yourself, you create a object, perform the asynchronous operation, and when it completes, call the , , or method, or the `Try` version of one of these methods. When you implement a TAP method manually, you must complete the resulting task when the represented asynchronous operation completes. For example: