How to Use GetStockIcon for WinForms in .NET 8

Buried deep in the list of .NET 8 improvements for WinForms is the GetStockIcon method. It gives us a way to access stock Windows icons at runtime for the OS the app is running on. Let’s check it out.

December 18, 2024

Using Raw String Literals in C# 11 / .NET 7

C# 11 added raw string literals, not a life-altering new feature, but they could be useful in the right circumstances. Let’s see how to use them.

December 14, 2024

Using Primary Constructors with Classes and Structs in C# 12 / .NET 8

As part of C# 12, we got a new feature called primary constructors. Let’s see how they work and what we can do with them.

December 13, 2024

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.

November 13, 2019