using System.Collections.Generic;
using System.Threading.Tasks;
public static async Task Main()
var tm = new TaskManager();
public class TaskManager{
List<Task> l = new List<Task>();
for(var i = 0; i < 10; i++){
l.Add(new MyBrokenTask().Log(i));
Console.WriteLine("Added broken task");
l.Add(new MyTask().Log(i));
Console.WriteLine("Added task");
Console.WriteLine("Waiting task completion");
Console.WriteLine("Complete!");
public async Task<bool> Log(int i){
Console.WriteLine("Test " + i);
public class MyBrokenTask
public async Task<bool> Log(int i){
throw new Exception("Broken!!");