Using Async, Await, and Task to keep the WinForms UI responsive Using the async/await pattern in WinForms is an easy win, helping prevent one of the most annoying user experiences - a frozen UI.
The right way to rethrow an exception in C# All programming languages have gotchas to trip you up, and C# is no exception. Today, let's check out the subtle (but significant) difference between "throw" and "throw ex".
Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement This error might look a little cryptic at first glance, but it's fairly descriptive in explaining what's wrong. You're likely to come across this one before your first cup of coffee.
Assign C# code to a variable and then run it Did you know most languages have a way to pass around code to other functions, so you can call (invoke) it in other parts of your application? In C#, it's called a delegate.
How can I find the state of NumLock, CapsLock or ScrollLock in WPF? If you're writing a WPF application and need to find the state of the Num Lock, Caps Lock, or Scroll Lock keys, you're in luck - there's a method for that.
What is the opposite of Any in LINQ? One of the many nice functions in LINQ is a single word that iterates through a collection, returning true if at least one item in the collection matches the condition you specify. But what's the opposite of the Any keyword in LINQ?
Using an application config file with a .NET Standard app and NUnit 3 Porting .NET Framework code to .NET Standard has been a learning experience, with some challenges too. This time I had a .NET Standard library that expected an application config file, but loading one from an NUnit test suite proved to be more difficult than it sounded at first.