C# Refactoring Tips and Tricks

C# Refactoring Tips and Tricks

43mBeginner2023-09-26

Authors

Jesse Freeman

Jesse Freeman

Head of Partner and Framework Marketing at Amazon

Course details

Refactoring code makes it cleaner, more performant, and readable. It eliminates unused functionality, renames and reorganizes elements to make their purpose clearer, and allows for more abstraction. This course provides C# developers with tips and tricks for refactoring existing codebases. Learn how to create a baseline for your project to back up and track the results of your work, and start removing unused code. Discover how to refactor along branches and use popular refactoring techniques, including Rename Method, Extract Method, and Encapsulate Field. Learn how to optimize code by avoiding loops, simplifying math, and inlining code, and create cleaner code that emphasizes readability. Plus, get tips on packaging and distributing refactored libraries as APIs.

Learning objectives
Creating a baseline
Removing unused code
Refactoring in branches
Using refactoring tools
Optimizing code
Creating clean code

Skills covered

C#Tips, Tricks, & TechniquesProgramming LanguagesMicrosoftSoftware Development

Concepts

Introduction

  • Welcome
  • What you should know
  • What is refactoring

Refactoring Strategies

  • Create a baseline
  • Incremental steps
  • Remove unused code
  • Improve performance

Before You Refactor

  • Use version control
  • Refactor in branches
  • Tools for refactoring

Optimizing Code

  • Identify problem areas
  • Common optimizations
  • Inlining code

Creating Clean Code

  • Code readability
  • Extract methods
  • Create clean APIs

Conclusion

  • Next steps
40,000 Toman