Task.WhenAny do in C#?Task.WhenAny waits for any one of a set of tasks to complete and returns the first completed task.
Task.WhenAny?After Task.WhenAny returns, you can access the Result property of the returned task if it is a Task<T>.
Task.WhenAny waits for all tasks to complete before returning.False. Task.WhenAny returns as soon as any one task completes.
Task.WhenAny return?It returns a Task<Task> representing the first completed task.
Task.WhenAny instead of Task.WhenAll?You use Task.WhenAny when you want to proceed as soon as the first task finishes, instead of waiting for all tasks.
Task.WhenAny return?Task.WhenAny returns the first task that completes among the given tasks.
Task.WhenAll waits for all tasks to complete before continuing.
Task.WhenAny completes, how do you get the result of the first finished task if it returns a value?You await the returned task and then access its Result property.
Task.WhenAny?Task.WhenAny is useful when you want to act on the first completed task, like the first finished download.
Task.WhenAny returns?Other tasks keep running unless you explicitly cancel them.
Task.WhenAny works and when you would use it.Task.WhenAny and Task.WhenAll.