Explore C# Blog Posts

Dive Into .NET Ecosystem

Improve your backend skills by joining my community of developers.

Subscribe to get 1-2 practical tips on backend development each week.

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

Getting Started with C# Records
csharp

Getting Started with C# Records

C# 9.0 introduced a new feature called records, they offer immutability and equality comparison out of the box. Learn how to use records, what features they offer and reveal the use cases when records can be used instead of classes