Skip to main content
CF

Design Patterns in C# and .NET

20h 15m 1s
English
Free

Design patterns help you solve common design problems. In this course, you see how each pattern works in modern C# and .NET. You learn why patterns matter, how they shape your code, and how you can use them in real projects.

What Are Design Patterns

Design patterns give you proven ways to handle common design issues. The idea comes from the book Design Patterns: Elements of Reusable Object‑Oriented Software by the “Gang of Four.” The original examples use C++ and Smalltalk, but the concepts work in C#, Java, JavaScript, and many other languages.

You already use several patterns without thinking about it. Many show up in libraries and even inside the language itself.

What This Course Covers

The course covers all GoF patterns and shows how they look in modern C#. You also see pattern variations and practical trade‑offs.

SOLID Principles

  • Single Responsibility
  • Open‑Closed
  • Liskov Substitution
  • Interface Segregation
  • Dependency Inversion

Creational Patterns

  • Builder
  • Factory Method
  • Abstract Factory
  • Prototype
  • Singleton

Structural Patterns

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

Behavioral Patterns

  • Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Null Object
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor

Who This Course Helps

This course is for C# and .NET developers who want clear, practical examples of each pattern. You see both common and modern approaches, including dynamic features from the DLR. You compare static and dynamic versions of patterns so you understand when each approach makes sense.

How the Course Is Taught

The lessons are live coding sessions in Visual Studio. Most examples fit in a single file, so you can download them and run them in any IDE. You work with NuGet packages, unit tests, and memory tools as part of the demos.

Requirements

  • Solid understanding of C#
  • Familiarity with recent C# features
  • Basic knowledge of object‑oriented design

Who Should Join

  • New and experienced developers
  • Anyone who wants to learn design patterns

What You Will Learn

  • How to spot and apply design patterns
  • How to refactor code to use patterns
  • How to choose the right pattern for a problem

About the Author: Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 172 lessons

  • Space or K: play or pause
  • J: rewind 10 seconds
  • L: forward 10 seconds
  • Left Arrow: rewind 5 seconds
  • Right Arrow: forward 5 seconds
  • Up Arrow: volume up
  • Down Arrow: volume down
  • M: mute or unmute
  • F: toggle fullscreen
  • T: toggle theater mode
  • I: toggle mini player
  • 0 to 9: seek to 0 to 90 percent of the video
  • Shift plus N: next video
  • Shift plus P: previous video
0:00 0:00
#Lesson TitleDuration
1Introduction 07:13
2Overview 01:17
3Single Responsibility Principle 07:31
4Open-Closed Principle 17:25
5Liskov Substitution Principle 06:38
6Interface Segregation Principle 06:34
7Dependency Inversion Principle 11:12
8Summary 05:26
9Gamma Categorization 03:38
10Overview 01:44
11Life Without Builder 03:35
12Builder 09:07
13Fluent Builder 01:17
14Fluent Builder Inheritance with Recursive Generics 12:38
15Stepwise Builder 09:01
16Functional Builder 10:21
17Faceted Builder 11:12
18Summary 00:59
19Overview 02:23
20Point Example 04:39
21Factory Method 05:04
22Asynchronous Factory Method 05:03
23Factory 03:00
24Object Tracking and Bulk Replacement 12:02
25Inner Factory 05:43
26Abstract Factory 11:22
27Abstract Factory and OCP 09:53
28Summary 01:06
29Overview 02:00
30ICloneable is Bad 07:38
31Copy Constructors 03:56
32Explicit Deep Copy Interface 02:35
33Prototype Inheritance 20:25
34Copy Through Serialization 09:06
35Summary 01:09
36Overview 02:45
37Singleton Implementation 08:41
38Testability Issues 07:23
39Singleton in Dependency Injection 08:59
40Monostate 03:47
41Per-Thread Singleton 04:26
42Ambient Context 12:27
43Summary 02:16
44Overview 02:37
45Vector/Raster Demo 08:36
46Adapter Caching 06:05
47Generic Value Adapter 25:19
48Adapter in Dependency Injection 09:08
49Summary 01:11
50Overview 02:51
51Bridge 09:51
52Summary 01:34
53Overview 01:54
54Geometric Shapes 07:34
55Neural Networks 08:01
56Composite Specification 05:59
57Summary 01:12
58Overview 02:35
59Custom String Builder 06:20
60Adapter-Decorator 06:34
61Multiple Inheritance with Interfaces 08:41
62Multiple Inheritance with Default Interface Members 07:45
63Dynamic Decorator Composition 07:40
64Detecting Decorator Cycles 22:03
65Static Decorator Composition 09:31
66Decorator in Dependency Injection 06:12
67Summary 02:03
68Overview 03:10
69Façade 08:00
70Summary 01:26
71Overview 05:25
72Repeating User Names 12:30
73Text Formatting 08:54
74Summary 00:59
75Overview 03:13
76Protection Proxy 03:12
77Property Proxy 09:25
78Value Proxy 12:06
79Composite Proxy: SoA/AoS 11:31
80Composite Proxy with Array-Backed Properties 06:43
81Dynamic Proxy for Logging 11:51
82Proxy vs. Decorator 01:28
83ViewModel 08:43
84Bit Fragging 25:05
85Summary 00:56
86Overview 03:34
87Command Query Separation 01:29
88Method Chain 12:16
89Broker Chain 13:51
90Summary 01:19
91Overview 03:07
92Command 07:48
93Undo Operations 06:06
94Composite Command 12:12
95Summary 01:10
96Overview 04:01
97Handmade Interpreter: Lexing 07:53
98Handmade Interpreter: Parsing 12:06
99ANTLR 02:45
100Summary 01:04
101Overview 01:43
102Iterator Object 11:50
103Iterator Method 06:58
104Iterators and Duck Typing 04:07
105Array-Backed Properties 05:52
106Summary 01:29
107Overview 01:14
108Chat Room 10:43
109Event Broker 15:31
110Introduction to MediatR 13:21
111Summary 01:17
112Overview 01:42
113Memento 06:05
114Undo and Redo 07:16
115Memento for Interop 06:39
116Summary 01:18
117Overview 01:59
118Null Object 08:54
119Null Object Singleton 05:09
120Dynamic Null Object 06:12
121Summary 00:42
122Overview 02:12
123Observer via the 'event' Keyword 07:10
124Weak Event Pattern 08:26
125Observer via Special Interfaces 18:29
126Observable Collections 09:46
127Bidirectional Observer 14:49
128Property Dependencies 13:31
129Declarative Event Subscriptions with Interfaces 27:09
130Summary 00:57
131Overview 03:10
132Classic Implementation 12:33
133Handmade State Machine 06:45
134Switch-Based State Machine 06:39
135Switch Expressions 08:50
136State Machine with Stateless 05:38
137Summary 01:01
138Overview 01:51
139Dynamic Strategy 08:26
140Static Strategy 04:08
141Equality and Comparison Strategies 07:42
142Summary 00:27
143Overview 01:31
144Template Method 07:24
145Functional Template Method 03:39
146Summary 00:46
147Overview 04:47
148Intrusive Visitor 04:42
149Reflective Visitor 09:11
150Classic Visitor (Double Dispatch) 10:22
151Reductions and Transforms 14:25
152Dynamic Visitor via the DLR 07:12
153Acyclic Visitor 12:02
154Summary 01:10
155Creational Paterns Summary 04:42
156Structural Patterns Summary 06:14
157Behavioral Patterns Summary 08:49
158End of Course 00:55
159An ASCII C# String 13:59
160Continuation Passing Style 11:08
161Local Inversion of Control 17:44
162DI Container and Event Broker Integration 10:12
163Beyond the Elvis Operator 14:48
164CQRS and Event Sourcing 26:43
165Overview 05:11
166Builder 04:58
167Decorator 04:40
168Factory 08:16
169Interpreter 09:59
170Strategy 05:39
171Template Method 10:07
172Summary 02:56

Related courses

Frequently asked questions

What is Design Patterns in C# and .NET about?
Design patterns help you solve common design problems. In this course, you see how each pattern works in modern C# and .NET. You learn why patterns matter, how they shape your code, and how you can use them in real projects. What Are…
Who teaches this course?
It is taught by Udemy. You can find more courses by this instructor on the corresponding source page.
How long is the course?
It contains 172 lessons with a total runtime of 20 hours 15 minutes. Every lesson is available to watch online at your own pace.
Is it free to watch?
Yes — this is a free online course on CourseFlix. You can watch every lesson without a paid subscription.
Where can I watch it online?
The course is available to watch online on CourseFlix at https://courseflix.net/course/design-patterns-in-c-and-net. The page hosts every lesson with the integrated video player; no download is required.