Where applicable favour Boolean assignment via expressions rather than if/else blocks. The first example below is still so common but the 2nd and 3rd examples require much less code without sacrificing readability.
![](https://csharp.academy/wp-content/uploads/2024/06/Favour-Boolean-assignment-via-expressions-in-C-rather-than-ifelse.png)
Note… Visual Studio has a nice refactor to help converting relevant if/else blocks to an expression.