Code Maze Author

Lennart Pries

Lennart is a dedicated .NET developer specializing in web applications and C# interfaces. Lennart has hands-on experience in database management, particularly with PostgreSQL, and is proficient in back-end development using C# and the .NET framework. With a keen interest in technology, he actively seeks opportunities to expand his knowledge and skill set.
Also find me here:

MY ARTICLES:

How to Get the Number of CPU Cores in C#

Environment.ProcessorCount gives us the number of logical processors our process can use, and it works on every platform .NET runs on. For physical cores and processor sockets, we query WMI on Windows through the System.Management package. Knowing the difference...

How to Escape Curly Braces and Special Characters in C#

To escape curly braces in C#, we double them: {{ gives us { and }} gives us }. The rule is the same in string.Format() and in interpolated strings, and raw string literals that start with $$ let us skip the doubling altogether. Curly brackets mark placeholders in a...

Consistent Byte Representation of Strings in C# Without Encoding

In the vast landscape of C# programming, handling strings stands out as a fundamental and frequently encountered task. However, ensuring a consistent byte representation of strings without explicitly specifying an encoding can be a bit perplexing for developers...

How to Switch Between .NET SDK Versions

In this article, we will learn how to switch between .NET SDK versions in our projects. By default, .NET uses the latest SDK installed on a given machine, even when developing with an earlier .NET runtime version. Actually, we can benefit from the latest SDK features...