Given the following:
var tPass1 = Task.FromResult(1); var tFail1 = Task.FromException(new ArgumentException(\"fail1\")); var tFail2 = Task.FromExc
Change
var task = Task.WhenAll(tPass1, tFail1, tFail2); task.Wait();
to
var all = new Task[] { tPass1, tFail1, tFail2 } .Where(t => t.Status == TaskStatus.RanToCompletion); var task = Task.WhenAll(all); task.Wait();
Working example