Click here to Skip to main content
15,884,099 members
Articles / Programming Languages / C#

C# Bad Practices: Learn How to Make Good Code by Using Examples of Bad Code – Part 2

Rate me:
Please Sign up or sign in to vote.
4.83/5 (178 votes)
22 Sep 2021CPOL17 min read 264.9K   314  
Improve your factory!
In this article, I will concentrate on getting rid of switch-case statement from the abstract factory. In my opinion, there is no one silver bullet to fix this issue for every case, so I decided to show a few versions of implementation and describe the advantages and disadvantages of each.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Ireland Ireland
Passionate, Microsoft Certified Software Developer(Senior),
having Masters Degree in Information Technology.

Comments and Discussions