C# language feature:

  • Allow await in catch and finally blocks

applies to

  • catch and finally blocks

benefit

  • Allows asynchronous calls in catch/finally blocks.

how to use

  • Within catch and finally blocks use await

caution

  • If another exception occurs within the catch/finally block, the original exception is lost.It is recommended to write catch and finally clauses carefully, to avoid introducing new exceptions

example:

/* coming soon */