Same for this. Use Task.WhenAll instead of Parallel.ForEach