Skip to Content
Clean Code with C# - Second Edition
book

Clean Code with C# - Second Edition

by Jason Alls
December 2023
Intermediate to advanced
492 pages
12h 40m
English
Packt Publishing
Content preview from Clean Code with C# - Second Edition

11

Refactoring C# Code

In this chapter, we will look at the problem code and how to refactor it. In the industry, problematic code is normally termed code smell. It is code that compiles, runs, and does what it is supposed to do. The reason it is problem code is that it becomes unreadable, complex in nature, and makes the code base hard to maintain and extend further down the line. Such code should be refactored as soon as it’s feasible to do so. It is technical debt, and in the long run, if you don’t deal with it, it will bring the project to its knees. When this happens, you are looking at an expensive redesign and must recode the application from scratch.

So, what is refactoring? Refactoring is the process of taking existing code that works ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming C# 12

Programming C# 12

Ian Griffiths

Publisher Resources

ISBN: 9781837635191Supplemental Content