/DesignPatterns

Project : Design Patterns Examples in C#

Primary LanguageC#GNU General Public License v3.0GPL-3.0

Design Patterns

Design patterns are solutions to recurring problems; guidelines on how to tackle certain problems. I have included implementations of some design patterns in C# to help beginners like me get their feet wet. There are better alternatives available for some of them in the .NET Framework, so this is by no means a comprehensive tutorial.

Any comments and suggestions are welcome. If you want to add a new design pattern implementation, just follow the naming convention, fork my repo and submit a pull request. Same goes for any improvements and modifications.

Types of Design Patterns


There are three kinds of Design Patterns:

  • Creational
  • Structural
  • Behavioral

List of Design Pattern Implementations


Install requirements

To install missing framework, download:

for MacOS X

https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.1.0&arch=x64&rid=osx.10.15-x64

for all platforms

https://dotnet.microsoft.com/zh-cn/download/dotnet/2.1/runtime?cid=getdotnetcore

How to run

cd to a certain pattern sub-folder, and dotnet run. Or, you can use batch_dotnet_run.sh directly.