This repository contains my exercises when reading Martin Fowler's book:
Refactoring: Improving the Design of Existing Code, 1st Edition
All examples are in C# 10, .NET 6.0 (translated from original Java in the book)
- Note: Before and After are source code examples from Martin Fowler's book, Final are my improvements and interpretations.
(Page: 260)
You have repeated checks for a null value. Replace the null value with a null object.
See: Before | After | Final
In Refactoring, 2nd edition this refactoring technique is listed as: Introduce Special Case