Converting a BackgroundWorker to a Task with TaskCompletionSource

Sometimes the safer way to “update” old code is to leave it be and paint over it with a newer construct. Let’s see how to modernize a BackgroundWorker using Tasks and TaskCompletionSource.

  Dec 6, 2022 (rev. Sep 16, 2025) ·  9 min

Named arguments in C#

Named arguments in C#.. they’ve been around a long time, but does anyone use them? Let’s check out another feature that helps tame wild code.

  Oct 12, 2022 (rev. Sep 16, 2025) ·  6 min

Local functions in C# (aka nested methods)

C# 7 introduced a new tool for the belt - local functions. Let’s take a look at what they are, how to use them, and why we might not want to.

  Oct 8, 2022 (rev. Sep 16, 2025) ·  6 min

Checking for null in C#, using the null-conditional and null-coalescing operators

Checking for nulls in C# is tedious, but C# 6 gave us the null-conditional and null-coalescing operators. Let’s see how they’ve improved things.

  Sep 27, 2022 (rev. Sep 16, 2025) ·  6 min

Using string interpolation to craft readable strings in C#

The longer I write software, the more I come to appreciate clear code. String interpolation in C# is just one more way to help us do that.

  Sep 19, 2022 (rev. Sep 16, 2025) ·  4 min

Displaying an IIS hosted site in CEFSharp

Thanks to CEFSharp, we can finally bring WinForms to the web! That didn’t sound right. Okay, let’s just look at hosting a site in IIS and showing it.

  Aug 16, 2022 (rev. Sep 16, 2025) ·  2 min

ESI: Building Apps with Azure DevOps - Manage Dependencies

Continuing with Microsoft’s ESI lessons, I learned about Azure Artifacts and the benefits of package managers. They’re good. Use them. ;)

  Jul 30, 2022 (rev. Sep 16, 2025) ·  4 min

ESI: Building Apps with Azure DevOps - Implement a Workflow

Continuing with Microsoft’s ESI, I spent some time this week learning about workflows, reusable elements, and protecting and monitoring the code.

  Jul 16, 2022 (rev. Sep 16, 2025) ·  5 min

Host a simple webpage in WinForms with CefSharp

WinForms and the web. Like oil and water, they don’t mix well. But with CEFSharp, they mix a LOT better. Let’s check it out.

  Jun 28, 2022 (rev. Sep 16, 2025) ·  10 min

Mocking MessageBox (or any static class) in WinForms

Unit testing a WinForms app is an uphill battle in the best of times, before you add in classes like MessageBox. Let’s make the best of it.

  Jan 7, 2022 (rev. Sep 16, 2025) ·  4 min