Recent posts

Explore the recent C# blog posts

How To Write Elegant Code with C# Switch Expressions
csharp

How To Write Elegant Code with C# Switch Expressions

Discover how to write elegant code in C# by using switch expressions. This guide provides shows how switch expressions can simplify your code and improve readability. Learn through practical examples and start writing more elegant and maintainable code today.

Mastering Exception Handling in C#: A Comprehensive Guide
csharp

Mastering Exception Handling in C#: A Comprehensive Guide

Exception handling allows to gracefully manage errors, ensuring applications remain stable and user-friendly under unforeseen circumstances. This guide provides a comprehensive look at exception handling in C#, covering everything from basic try/catch blocks to throwing custom exceptions.

C# Init Only and Required Properties
csharp

C# Init Only and Required Properties

C# 9.0 introduced init only properties. The init only property can be assigned only during object creation and can't be changed further. This enforces immutability. Required properties were introduced in C# 11 which is a great addition to init only properties. Required ensures that init only properties are assigned during objection creation, as these properties can't be change further

Improve Your .NET and Architecture Skills

Join my community of 2400+ developers and architects.

Each week you will get 1 practical tip with best practises and architecture advice.