The examples state that the location of a throw statement relative to the first await statement affects the exception behavior. This is not correct, per §8.9.5 The throw statement in the C# Language Specification. In a task-returning async method, all exceptions are propagated through the returned task, regardless of the location of the throw statement.
The examples state that the location of a
throwstatement relative to the firstawaitstatement affects the exception behavior. This is not correct, per §8.9.5 The throw statement in the C# Language Specification. In a task-returning async method, all exceptions are propagated through the returned task, regardless of the location of thethrowstatement.