C# - Catching exceptions from unawaited tasks

I recently stumbled upon some code which looked something like the following: var ct = new CancellationToken(); Task.Run(async () => { while (!ct.IsCancellationRequested) { CallToMethodThatMightThrowAnException(); await Task. »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on .Net, Task, C#