© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
V. SarcarSimple and Efficient Programming with C# https://doi.org/10.1007/978-1-4842-7322-7_6

6. Separate Changeable Code Using Factories

Vaskaran Sarcar1  
Kolkata, West Bengal, India

A developer’s end goal is to make an application that meets the customer’s requirements. The code must be easily extensible, maintainable, and stable enough to meet future needs. It is tough to write the best version of a program on the very first attempt. You may need to analyze the code and refactor it several times. In this chapter, you will see such a scenario and learn how to use factories. To make the discussion simple, I start with a small program. We’ll keep analyzing ...

Get Simple and Efficient Programming with C# : Skills to Build Applications with Visual Studio and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.