• Courses
  • TutorialsFree
  • Learning Paths
  • Blogs
  • Authors
  • Dometrain Pro
  • Shopping Basket

    Your basket is empty

  • Business Portal
  • From Zero to Hero: Refactoring for C# Developers

    Learn how to refactor C# code using the best refactoring techniques

    About This Course

    Are you a C# developer keen on enhancing code quality and maintainability? If yes, this "From Zero to Hero" course called "Refactoring for C# Developers" is tailor-made for you! This course will equip you with practical skills and the latest practices to refactor any C# codebase. Starting with an overview of refactoring, its importance, and when it's needed, the course delves into various modern and clean refactoring techniques. The best part? The course uses real-world examples to demonstrate how to transform a codebase to make it more efficient, readable, and extendable. With a focus on hands-on learning, guided examples are provided to demonstrate the refactoring process. But that's not all! The course also covers the implications of refactoring on team collaboration and project scalability. By the end of this course, you'll have a solid grasp of refactoring practices, which you can apply directly to your C# development projects. This course is delivered by Nick Cosentino, a Principal Software Engineering Manager at Microsoft, and is based on years of hands-on experience in the field.

    Course Curriculum

    5h 6m 10 sections
    Welcome
    4:42 Free preview
    What will you learn in this course?
    4:34 Free preview
    Who is the course for and prerequisites
    4:14 Free preview
    Teaching style
    3:29 Free preview
    What is refactoring?
    8:30
    What are the general goals of refactoring?
    13:00
    Introduction
    2:34
    Renaming private members
    7:05
    Renaming public members
    7:25
    Extract method
    6:14
    Inline method
    6:57
    Section recap
    1:59
    Introduction
    2:05
    Decompose conditional
    18:31
    Replace with temp query
    9:11
    Return early / reduce nesting
    10:52
    Section recap
    1:03
    Introduction
    1:28
    Wrap/isolate dependencies
    23:51
    Extract and inject
    19:39
    Section recap
    2:12
    Introduction
    1:43
    Parameters to parameter object
    9:19
    Replace conditional with polymorphism and composition
    17:52
    Introduction
    1:26
    Rule of 3 and DRY
    11:36
    Pull up method
    10:54
    Form template method
    7:26
    What is a rewrite vs refactor?
    19:41
    What are the pros of rewriting?
    12:09
    What are the cons of rewriting?
    16:48
    Mitigating risks in large refactors
    11:16
    Introducing the example
    2:03
    Conversion routes
    3:04
    Weather web response
    2:24
    Rule of three + DRY on DTOs
    3:36
    Strangler fig + repository facade
    11:15
    Summary of example
    1:28
    Summary & Thank You
    2:28

    Meet Your Instructor

    Nick Cosentino

    Nick Cosentino

    Nick Cosentino is a Principal Software Engineering Manager at Microsoft and a .NET content creator. He manages the teams responsible for deploying the hundreds of services supporting the Microsoft365 suite of products to serve users across the planet. Nick brings his unique experiences to the Big Tech world having worked at a startup that scaled from a handful of employees to hundreds before it went public.

    Nick runs a software engineering and dotnet-focused blog as well as a YouTube channel called Dev Leader. While he enjoys solving complex problems with software solutions, Nick is passionate about reducing barriers for people to get started on their software engineering journey.

    View all courses by Nick Cosentino

    What's New

    What's new in C# 14
    blog

    What's new in C# 14

    This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

    Learn More
    Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    course

    Let's Build It: AI Chatbot with RAG in .NET Using Your Data

    Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

    Learn More
    Working with Large Language Models
    tutorial

    Working with Large Language Models

    Learn how to work with Large Language Models (LLMs). Understand the fundamentals of how GPT works, the transformer architecture, and master prompt engineering techniques to build AI agents.

    Learn More
    From Zero to Hero: SignalR in .NET
    course

    From Zero to Hero: SignalR in .NET

    Enable enterprise-grade real-time communication for your web apps with SignalR.

    Learn More
    Deep Dive: Solution Architecture
    course

    Deep Dive: Solution Architecture

    Master solution architecture and turn business needs into scalable, maintainable systems.

    Learn More
    Migrating: ASP.NET Web APIs to ASP.NET Core
    course

    Migrating: ASP.NET Web APIs to ASP.NET Core

    A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

    Learn More
    Getting Started: Caching in .NET
    course

    Getting Started: Caching in .NET

    Let's make the hardest thing in programming easy for .NET software engineers.

    Learn More
    From Zero to Hero: Testing with xUnit in C#
    course

    From Zero to Hero: Testing with xUnit in C#

    Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

    Learn More
    Create a ChatGPT Console AI Chatbot in C#
    blog

    Create a ChatGPT Console AI Chatbot in C#

    This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

    Learn More