Issues » #443

#443 – February 27, 2023

Re-thinking the Visitor Pattern with the Double-Dispatch Approach

This article will help you have another point of view with the Visitor Pattern by thinking it with the Double-Dispatch Approach. This article will also show you a practical use case of how this pattern is applied in .NET.

Want to Keep your Main Branch Green? You Should Use a Merge Queue (sponsor)

Outdated pull requests are the root cause of many issues: broken main, constant revert, and frustration. Using a merge queue allows you to update, test and merge each PR automatically and sequentially. No more broken main, manual reverts, and rebases. Embrace both safety and velocity!

C# "var" with a Reference Type is Always Nullable

As an addition to the series on nullability in C#, we should look at the "var" keyword. This is because "var" behaves a little differently than it did before nullable reference types. Specifically, when nullability is enabled, using "var' with a reference type always results in a nullable reference type.

Applying Postel’s law in ASP.NET

An important aspect in building robust systems is applying ‘Postel’s law’. Postel's Law was formulated by Jon Postel, an early pioneer of the Internet. The law was really a guideline for creators of software protocols. The idea was that different implementations of the protocol should interoperate.

The scoped keyword

To explain what this keyword does, I have to talk first about ref struct. C# 8 introduced ref struct where it was used to implement the Span type. A ref struct guarantees that an instance of the type is allocated on the stack and can’t escape to the managed heap. To guarantee this, strict scoping rules are enforced by the compiler.

Refactoring huge C# code base in minutes

With my team, we like to keep our C# code base updated. So, recently we went to .NET 7 and C# 11. At the same time, we were still adopting some of the new capabilities of .NET 6 and C# 10.

Creating a custom Main method in a WPF application

In this post, I describe how to create a custom Main method in a .NET WPF application


Join over 25,900 readers for a free weekly email with fresh news, articles and tutorials.