Web Development · WDC-87

C# OOP and Design Patterns

C# OOP and Design Patterns is a course in object-oriented programming with C# on .NET, covering encapsulation, inheritance, polymorphism and interfaces through to SOLID principles, dependency injection and widely used design patterns. It suits developers who already write C#, team leads and students who want to write code that is easier to maintain and test.

Updated
From 8,550 THB / person 9,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration18 hours · 3 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

Once you can write C#, the next problem appears as systems grow: code becomes hard to change, every new feature breaks something else, and little can be reused. Thinking in objects and knowing the design patterns that developers worldwide use for recurring problems helps you design systems with clear boundaries that are testable and easy to change.

This new edition of the course is updated for C# 14 on .NET 10 (LTS) and builds on Basic C# Programming. It starts with the four principles of OOP, modern C# classes and objects, interfaces, generics and events, moves on to SOLID principles and dependency injection, and then puts the most widely used creational, structural and behavioural design patterns into practice, with unit tests in xUnit and a workshop that designs a system from a business brief. (3 days, 6 hours per day, 18 hours in total, Intermediate level.)

What you’ll gain

  • Understand object-oriented thinking and why it replaces a top-down approach
  • Design classes with encapsulation, abstraction, inheritance and polymorphism
  • Use modern C# features such as primary constructors, records, the field keyword and extension members
  • Choose between abstract classes, sealed and interfaces appropriately
  • Apply SOLID principles and dependency injection to reduce coupling
  • Implement widely used creational, structural and behavioural design patterns
  • Test object-oriented code with unit tests in xUnit

Who this course is for

  • Developers who already write C# and want code that is easier to maintain
  • People who want to build web applications or APIs with C# and ASP.NET Core
  • IT managers and team leads who want to set design standards for their team
  • Students who have learned C# basics and want a deep understanding of OOP

Prerequisites

  • Able to program in C#, or completed the Basic C# Programming course
  • Understanding of variables, conditions, loops, methods and collections in C#
  • Some experience with Visual Studio or VS Code
  • A laptop with permission to install software

Curriculum

Course Details

This course is a 2026 edition that replaces the previous C# OOP course. It has been rewritten and updated for C# 14 on .NET 10 (LTS). It runs for 3 days, 6 hours per day (18 hours in total, 09:00-16:00), as lectures alternating with labs and workshops. Intermediate level. It builds on Basic C# Programming, which covers classes and inheritance at a basic level, and goes deeper into design: the four principles of OOP, interfaces, generics and events, SOLID principles and dependency injection, and creational, structural and behavioural design patterns, with unit tests in xUnit and a workshop that designs a system from a business brief. Learners take home a lab guide and source code for every pattern.

Day 1 OOP Thinking and Class Design

Section 1: Lab: Why OOP, and Setting Up the Tools

  • The problems of top-down code as systems grow, and the pros and cons of OOP
  • Thinking in objects: data and behaviour together
  • Install the .NET 10 SDK and Visual Studio 2026 or VS Code with C# Dev Kit
  • Create a solution with a class library, a console app and a test project using the dotnet CLI
  • Lab: turn a top-down program into a first class

Section 2: Lab: Classes and Objects in C# 14

  • Fields, properties, methods and constructors
  • Primary constructors and object initialisers
  • required and init members for data that must be set at creation
  • Static members and when to use them
  • Lab: create product and shopping cart classes

Section 3: Lab: Encapsulation

  • Hide an object's state with access modifiers
  • How properties differ from fields, and validating values before they are set
  • The C# 14 field keyword for properties with logic
  • Immutability with records and readonly
  • Lab: stop an account balance from being changed the wrong way

Section 4: Lab: Abstraction and Class Design

  • Abstraction: expose only what users of an object need to know
  • Assign clear responsibilities to classes from a business brief
  • Read and draw UML class diagrams with Mermaid
  • Value objects versus entities
  • Lab: design the classes of a meeting room booking system

Section 5: Lab: Inheritance and Composition

  • Inheritance with base classes and the base keyword
  • The protected access modifier and the order in which constructors run
  • is-a versus has-a relationships
  • When to prefer composition over inheritance
  • Lab: restructure classes for several types of employee
Day 2 Polymorphism, Interfaces and SOLID

Section 6: Lab: Polymorphism

  • The principle of polymorphism, or many forms
  • Method overloading and operator overloading
  • virtual, override and how they differ from hiding with new
  • Check an object's type with pattern matching
  • Lab: calculate several kinds of shipping cost through one method

Section 7: Lab: sealed and abstract Classes

  • Why sealed classes and sealed methods matter
  • How abstract classes and abstract methods differ from ordinary classes
  • A template of steps with an abstract class
  • Lab: a payment system that forces every channel to follow the same steps

Section 8: Lab: Interfaces

  • Using interfaces, and the difference between abstract classes and interfaces
  • Implementing several interfaces and explicit implementation
  • Default interface methods and static abstract members
  • Standard .NET interfaces: IComparable, IEquatable and IDisposable
  • Lab: sort and compare objects through interfaces

Section 9: Lab: Generics, Delegates, Events and Extension Members

  • Generic classes and methods with constraints
  • Delegates, Func, Action and lambdas
  • Declare and use events to signal changes
  • Extend existing types with C# 14 extension members
  • Lab: a generic repository that raises an event when data changes

Section 10: Lab: SOLID Principles and Dependency Injection

  • The single responsibility and open/closed principles
  • Liskov substitution, interface segregation and dependency inversion
  • Dependency injection with Microsoft.Extensions.DependencyInjection
  • Singleton, scoped and transient lifetimes
  • Lab: refactor tightly coupled code so that it can be tested with DI
Day 3 Design Patterns and Workshop

Section 11: Lab: Design Patterns and the Creational Group

  • What design patterns are, and the Gang of Four catalogue
  • A thread-safe Singleton with Lazy compared with a DI singleton lifetime
  • Factory Method for creating objects based on conditions
  • Builder for objects that take several steps to create
  • Lab: a multi-channel notification sender built with Factory Method

Section 12: Lab: Structural Patterns

  • Composite for hierarchical data such as menus and organisation charts
  • Adapter for connecting new code to existing systems
  • Decorator for adding behaviour without changing the original class
  • Facade for hiding the complexity of several subsystems
  • Lab: add logging and caching to a service with Decorator

Section 13: Lab: Observer and Strategy

  • The Observer pattern with events and IObservable
  • The Strategy pattern for switching algorithms at run time
  • Using Strategy together with dependency injection
  • Lab: a discount calculator with several rules using Strategy

Section 14: Lab: More Behavioural Patterns

  • The Command pattern for actions that can be undone
  • Template Method for processes that share the same outline
  • The State pattern for objects whose behaviour changes with their state
  • Choosing the right pattern, and avoiding patterns you do not need
  • Lab: order status handling with the State pattern

Section 15: Workshop: Designing a System from a Business Brief, with Unit Tests

  • Analyse the brief and draw the system's class diagram
  • Choose the OOP principles, SOLID ideas and patterns that fit each part
  • Write unit tests in xUnit to confirm the system's behaviour
  • Present the work, review the design together and plan the move to ASP.NET Core

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

What is the difference between an interface and an abstract class in C#?

An abstract class is a base class that cannot be instantiated directly; it can have fields, constructors and implemented methods, and a class can inherit from only one. It suits related classes with an is-a relationship that share code. An interface is a contract describing what a class can do, and a class can implement many. In modern C# interfaces can have default methods and static abstract members but no instance state, so they suit shared capabilities across unrelated classes.

What is the Strategy pattern and what problem does it solve?

The Strategy pattern moves interchangeable algorithms into their own classes that implement the same interface, and the main object calls them through that interface. You can switch the calculation at run time without long if or switch blocks and add new options without changing existing code, in line with the open/closed principle. Typical examples are discount rules, shipping providers and payment methods, and it works well with dependency injection.

How do you apply encapsulation in C#, and how do properties differ from fields?

Encapsulation hides an object's internal state and exposes it only through controlled access. A field is a variable that holds the data and should usually be private, while a property provides get and set access where you can validate or calculate values. In C# 14 the field keyword refers to a property's backing store without declaring a separate field, and init or records are used when values may only be set at creation.

Who is the C# OOP and Design Patterns course for, and what should I know beforehand?

It suits developers who already write C#, people building web applications or APIs with C#, team leads and IT managers who want to set design standards, and students who have learned C# basics. You should be able to program in C# or have completed Basic C# Programming, understand variables, conditions, loops, methods and collections, and have some experience with Visual Studio or VS Code.

What will I be able to do after the C# OOP and Design Patterns course?

You will be able to design classes from a business brief using encapsulation, abstraction, inheritance and polymorphism, choose between abstract classes and interfaces, use C# 14 features such as records, the field keyword and extension members, reduce coupling with SOLID and dependency injection, implement patterns such as Factory Method, Decorator, Observer, Strategy and State, and write unit tests in xUnit. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the C# OOP and Design Patterns course be run in-house for our team?

Yes. IT Genius Institute runs in-house training for development teams. Examples can be drawn from systems similar to yours, the focus can be placed on the patterns your team actually uses, and joint design reviews can be added to help set team standards. Contact the institute for details and a quotation.