Task-based asynchronous pattern
Basic usage of Async/Await
You can start some slow process in parallel and then collect the results when they are done:
After two seconds both the results will be available.
Using TAP with LINQ
You can create an
Task by passing
AddressOf AsyncMethod to the LINQ
Select method and then start and wait all the results with
If your method has parameters matching the previous LINQ chain call, they will be automatically mapped.
To map different arguments you can replace
AddressOf Method with a lambda:
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0