Skip to main content
CourseFlix

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 a global online marketplace for teaching and learning. It connects students with instructors who share skills in many fields.

Who Uses Udemy

Millions of learners use Udemy to gain skills for work and personal growth. Companies, governments, and nonprofits also use Udemy to train their teams.

What Udemy Offers

Udemy provides a curated set of business and technical courses. These courses help teams build practical skills and support ongoing learning at work.

Watch Online 172 lessons

0:00 0:00
#Lesson TitleDuration
1Introduction07:13
2Overview01:17
3Single Responsibility Principle07:31
4Open-Closed Principle17:25
5Liskov Substitution Principle06:38
6Interface Segregation Principle06:34
7Dependency Inversion Principle11:12
8Summary05:26
9Gamma Categorization03:38
10Overview01:44
11Life Without Builder03:35
12Builder09:07
13Fluent Builder01:17
14Fluent Builder Inheritance with Recursive Generics12:38
15Stepwise Builder09:01
16Functional Builder10:21
17Faceted Builder11:12
18Summary00:59
19Overview02:23
20Point Example04:39
21Factory Method05:04
22Asynchronous Factory Method05:03
23Factory03:00
24Object Tracking and Bulk Replacement12:02
25Inner Factory05:43
26Abstract Factory11:22
27Abstract Factory and OCP09:53
28Summary01:06
29Overview02:00
30ICloneable is Bad07:38
31Copy Constructors03:56
32Explicit Deep Copy Interface02:35
33Prototype Inheritance20:25
34Copy Through Serialization09:06
35Summary01:09
36Overview02:45
37Singleton Implementation08:41
38Testability Issues07:23
39Singleton in Dependency Injection08:59
40Monostate03:47
41Per-Thread Singleton04:26
42Ambient Context12:27
43Summary02:16
44Overview02:37
45Vector/Raster Demo08:36
46Adapter Caching06:05
47Generic Value Adapter25:19
48Adapter in Dependency Injection09:08
49Summary01:11
50Overview02:51
51Bridge09:51
52Summary01:34
53Overview01:54
54Geometric Shapes07:34
55Neural Networks08:01
56Composite Specification05:59
57Summary01:12
58Overview02:35
59Custom String Builder06:20
60Adapter-Decorator06:34
61Multiple Inheritance with Interfaces08:41
62Multiple Inheritance with Default Interface Members07:45
63Dynamic Decorator Composition07:40
64Detecting Decorator Cycles22:03
65Static Decorator Composition09:31
66Decorator in Dependency Injection06:12
67Summary02:03
68Overview03:10
69Façade08:00
70Summary01:26
71Overview05:25
72Repeating User Names12:30
73Text Formatting08:54
74Summary00:59
75Overview03:13
76Protection Proxy03:12
77Property Proxy09:25
78Value Proxy12:06
79Composite Proxy: SoA/AoS11:31
80Composite Proxy with Array-Backed Properties06:43
81Dynamic Proxy for Logging11:51
82Proxy vs. Decorator01:28
83ViewModel08:43
84Bit Fragging25:05
85Summary00:56
86Overview03:34
87Command Query Separation01:29
88Method Chain12:16
89Broker Chain13:51
90Summary01:19
91Overview03:07
92Command07:48
93Undo Operations06:06
94Composite Command12:12
95Summary01:10
96Overview04:01
97Handmade Interpreter: Lexing07:53
98Handmade Interpreter: Parsing12:06
99ANTLR02:45
100Summary01:04
101Overview01:43
102Iterator Object11:50
103Iterator Method06:58
104Iterators and Duck Typing04:07
105Array-Backed Properties05:52
106Summary01:29
107Overview01:14
108Chat Room10:43
109Event Broker15:31
110Introduction to MediatR13:21
111Summary01:17
112Overview01:42
113Memento06:05
114Undo and Redo07:16
115Memento for Interop06:39
116Summary01:18
117Overview01:59
118Null Object08:54
119Null Object Singleton05:09
120Dynamic Null Object06:12
121Summary00:42
122Overview02:12
123Observer via the 'event' Keyword07:10
124Weak Event Pattern08:26
125Observer via Special Interfaces18:29
126Observable Collections09:46
127Bidirectional Observer14:49
128Property Dependencies13:31
129Declarative Event Subscriptions with Interfaces27:09
130Summary00:57
131Overview03:10
132Classic Implementation12:33
133Handmade State Machine06:45
134Switch-Based State Machine06:39
135Switch Expressions08:50
136State Machine with Stateless05:38
137Summary01:01
138Overview01:51
139Dynamic Strategy08:26
140Static Strategy04:08
141Equality and Comparison Strategies07:42
142Summary00:27
143Overview01:31
144Template Method07:24
145Functional Template Method03:39
146Summary00:46
147Overview04:47
148Intrusive Visitor04:42
149Reflective Visitor09:11
150Classic Visitor (Double Dispatch)10:22
151Reductions and Transforms14:25
152Dynamic Visitor via the DLR07:12
153Acyclic Visitor12:02
154Summary01:10
155Creational Paterns Summary04:42
156Structural Patterns Summary06:14
157Behavioral Patterns Summary08:49
158End of Course00:55
159An ASCII C# String13:59
160Continuation Passing Style11:08
161Local Inversion of Control17:44
162DI Container and Event Broker Integration10:12
163Beyond the Elvis Operator14:48
164CQRS and Event Sourcing26:43
165Overview05:11
166Builder04:58
167Decorator04:40
168Factory08:16
169Interpreter09:59
170Strategy05:39
171Template Method10:07
172Summary02:56