Technical requirements
You will need a recent version of Visual Studio Community Edition to follow along. You can access the source code for this chapter on GitHub at https://github.com/PacktPublishing/Clean-Code-with-CSharp-Second-Edition/tree/main/CH03.
The code is contained in a single solution with folders for specific topics. The Core folder holds demonstration classes that demonstrate namespaces and class grouping, with classes only doing what they are supposed to. The other folders demonstrate cohesion, coupling, dependency injection, designing for change, encapsulation, using immutable objects and data structures, inversion of control, and the Law of Demeter.