Refactoring the Switch Statement code smell

The Switch Statement code smell refers to using switch statements with a type code to get different behavior or data instead of using subclasses and polymorphism. In general, it looks like this: This switch(typeCode) structure is typically spread throughout many methods. This makes the code difficult to extend, and violates the Open-Closed Principle. This principle … Read more

Class Diagrams missing in Visual Studio 2019

Problem The Class Diagram item is missing in Visual Studio 2019. Solution For some reason this is not installed by default in Visual Studio 2019, so we simply need to install it. 1. In Visual Studio click Tools > Get Tools and Features… 2. Close Visual Studio. 3. In Visual Studio Installer: Click Individual components … Read more