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. »

C# - What is the [x..y] range operator?

Almost 5 years ago I made a post on the null-conditional operator [https://peterdaugaardrasmussen.com/2016/05/28/c-the-null-conditional-operator-and-the-road-to-avoid-nested-if-statements-2/] (?:) in C#. Now I am following up »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#