Open
Description
Docs suggest using LINQ extension method ToArray() to initiate execution. Whilst this is true and may be the right style for WhenAll() coding, I favour use of ToList() instead as this is more appropriate for the WhenAny() style [handy to handle completions as they arise] as often you have to .Remove() that completed Task from the in-progress list (s.t. all work is only complete when that list is empty). Would be good to explain & contrast imho. Thanks.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: d885f1eb-2b37-693b-c91f-74b748c9424a
- Version Independent ID: 77bdee53-c2a0-e16f-c93a-3ca0afae0b93
- Content: Asynchronous programming - C#
- Content Source: docs/csharp/asynchronous-programming/async-scenarios.md
- Product: dotnet-csharp
- Technology: csharp-async
- GitHub Login: @BillWagner
- Microsoft Alias: wiwagn