Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Refactoring with C#

You're reading from  Refactoring with C#

Product type Book
Published in Nov 2023
Publisher Packt
ISBN-13 9781835089989
Pages 434 pages
Edition 1st Edition
Languages
Author (1):
Matt Eland Matt Eland
Profile icon Matt Eland

Table of Contents (24) Chapters

Preface Part 1: Refactoring with C# in Visual Studio
Chapter 1: Technical Debt, Code Smells, and Refactoring Chapter 2: Introduction to Refactoring Chapter 3: Refactoring Code Flow and Iteration Chapter 4: Refactoring at the Method Level Chapter 5: Object-Oriented Refactoring Part 2: Refactoring Safely
Chapter 6: Unit Testing Chapter 7: Test-Driven Development Chapter 8: Avoiding Code Anti-Patterns with SOLID Chapter 9: Advanced Unit Testing Chapter 10: Defensive Coding Techniques Part 3: Advanced Refactoring with AI and Code Analysis
Chapter 11: AI-Assisted Refactoring with GitHub Copilot Chapter 12: Code Analysis in Visual Studio Chapter 13: Creating a Roslyn Analyzer Chapter 14: Refactoring Code with Roslyn Analyzers Part 4: Refactoring in the Enterprise
Chapter 15: Communicating Technical Debt Chapter 16: Adopting Code Standards Chapter 17: Agile Refactoring Index Other Books You May Enjoy

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Let’s look again at the IFlightUpdater interface from earlier.”

A block of code is set as follows:

public interface IFlightRepository {
  FlightInfo AddFlight(FlightInfo flight);
  FlightInfo UpdateFlight(FlightInfo flight);
  void CancelFlight(FlightInfo flight);
  FlightInfo? FindFlight(string id);
  IEnumerable<FlightInfo> GetActiveFlights();
  IEnumerable<FlightInfo> GetPendingFlights();
  IEnumerable<FlightInfo> GetCompletedFlights();
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public interface IFlightUpdater {
  FlightInfo AddFlight(FlightInfo flight);
  FlightInfo UpdateFlight(FlightInfo flight);
  void CancelFlight(FlightInfo flight);
}

Any command-line input or output is written as follows:

  Assert.Equal() Failure   Expected: 60   Actual: 50

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Click Next, then give your test project a meaningful name and click Next again.”

Tips or important notes

Appear like this.

lock icon The rest of the chapter is locked
Next Chapter arrow right
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}