METHOD
Task.WhenAny
Returns a task identifying a completed input; does not cancel other inputs.
Formal Syntax & Structure
csharp syntaxcsharp
Task.WhenAny(tasks)Working Example
Example Snippetcsharp
// Documentary fragment; see lesson for context and imports.Task<int> winner = await Task.WhenAny(first.Task, second.Task);