Search code examples
c#promisetask-parallel-library

What is the C# equivalent to Promise.all?


I would like to fetch data from multiple locations from Firebase Realtime Database like described here and here by Frank van Puffelen and I can't find any equivalent to Promise.all in c#. What would be the proper way to do it?


Solution

  • That you are looking for is Task.WhenAll. You should create as many tasks as the multiple locations from which you want to fetch your data and then feed them in this method.