using System.Threading.Tasks;
var listOf10Tasks1 = new Task<int>[]
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
var listOf10Tasks2 = new Task<int>[]
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
Task.Delay(TimeSpan.FromSeconds(rand.Next(0, 6))).ContinueWith((_) => rand.Next(0, 11)),
var Times10TaskTasks = new Task<int[]>[]
Task.WhenAll(listOf10Tasks1),
Task.WhenAll(listOf10Tasks1)
await Task.WhenAll(Times10TaskTasks).ContinueWith(async (intss) =>
foreach (var ints in await intss)
Console.WriteLine($"{string.Join(", ", ints)}");
static void Main(string[] args)
var asyncTest = new AsyncTest();