The source code for 800+ C# and .NET articles from code-maze.com.
Every article gets its own runnable solution, most with tests.
Blog · Courses · YouTube · Report an issue
Code Maze is a blog about C# and .NET, written with simplicity and pragmatism in mind. The articles are hands-on. They focus on the core of each topic and show working code, not theory alone.
This repository holds that code. If you came here from an article, the article links to its exact folder. If you are just browsing, pick a topic below.
You need the .NET SDK. Each project states its target framework in its .csproj file, so install the version that project asks for.
git clone https://github.com/CodeMazeBlog/CodeMazeGuides.git
cd CodeMazeGuides/<topic>/<article-folder>
dotnet build
dotnet run
dotnet testTip
The full repository is large. To get only one article, use a sparse checkout:
git clone --filter=blob:none --sparse https://github.com/CodeMazeBlog/CodeMazeGuides.git
cd CodeMazeGuides
git sparse-checkout set <topic>/<article-folder>The numbers show how many article projects each folder holds.
| Topic | Projects |
|---|---|
| C# basics | 45 |
| C# intermediate | 48 |
| C# advanced | 28 |
| Classes, structs and records | 11 |
| Methods | 9 |
| Operators | 5 |
| Strings | 39 |
| Numbers | 19 |
| LINQ | 20 |
| Async programming | 11 |
| Threads | 7 |
| Exception handling | 10 |
| Refactoring | 5 |
| Topic | Projects |
|---|---|
| Collections | 24 |
| Arrays | 24 |
| Lists | 16 |
| Dictionaries | 9 |
| Topic | Projects |
|---|---|
| ASP.NET Core Web API | 56 |
| ASP.NET Core features | 52 |
| Authentication and authorization | 23 |
| Query strings | 6 |
| Blazor features | 11 |
| Blazor libraries | 2 |
| Angular | 1 |
| Topic | Projects |
|---|---|
| Entity Framework Core | 28 |
| Dapper | 4 |
| MongoDB | 3 |
| JSON | 29 |
| XML | 6 |
| Files and streams | 23 |
| Date and time | 22 |
| Searching | 1 |
| Topic | Projects |
|---|---|
| Design patterns | 12 |
| Architectural patterns | 13 |
| Domain-driven design | 1 |
| Dependency injection | 11 |
| DI tools | 3 |
| Microservices | 2 |
| Topic | Projects |
|---|---|
| Client libraries | 60 |
| Base libraries | 3 |
| Testing | 32 |
| Logging | 13 |
| Performance | 9 |
| .NET CLI | 2 |
| Visual Studio | 5 |
| Deployment | 2 |
| Platform-specific code | 3 |
| Projects | 13 |
| Topic | Projects |
|---|---|
| Algorithms | 13 |
| Machine learning | 5 |
| AI | 1 |
| Images | 3 |
CodeMazeGuides/
├── <topic>/ # one folder per topic, e.g. aspnetcore-webapi
│ └── <article-folder>/ # one folder per article
│ ├── <Project>.sln # its own solution
│ ├── <Project>/ # the example code
│ └── Tests/ # tests, in most articles
└── .github/workflows/ # PR build: builds and tests changed projects
Each article is self-contained. You never need to build the whole repository.
Found a bug in an example, or does a project not build on a newer .NET version? Open an issue or send a pull request. The PR build checks every changed project automatically.
The blog is free. Our courses keep it that way. If the articles helped you, have a look:
Browse all Code Maze courses →
A ⭐ on this repository also helps other developers find it.
MIT. Use the code freely in your own projects.