Using TimeProvider and FakeTimeProvider in WinForms Testing .NET code involving time has always been a pain, but the TimeProvider class (backported to the .NET Framework) gives us awesome new tools.
How to use (and test) TimeProvider timers in .NET Testing timers in C# is difficult, but .NET 8 (C# 12) adds an abstract TimeProvider class that makes it easier. Let's take a closer look.
How to use TimeProvider and FakeTimeProvider (time abstraction in .NET) Testing time in C# is difficult, but .NET 8 (C# 12) adds an abstract TimeProvider class that makes it easier. Let's take a closer look.
What are list patterns in C#? C# has been getting a lot of pattern matching love in recent years, like with list patterns in C# 11. The problem is knowing where and how to use it.
What are generic attributes in C# 11? Generic attributes increase the flexibility of a very early .NET feature. Let's try using them and see how it keeps our code DRY.
Simple ways to notify a user... without a MessageBox When sending notifications in a WinForms app, a MessageBox is the only way to go... or is it? Let's get creative and see what else we might do.
How do I call an async method from a synchronous one, without deadlocking? Writing async code whenever possible is great, but how do we do it when we're stuck with legacy (and very synchronous) code?