
This repository contains the example code snippets referenced in my book Street Coder published by Manning Publications.
Source code in this "modern" branch is modified to adhere to the latest .NET standards and coding practices, so the readers can get an idea how to apply existing techniques on the newer frameworks.
The main changes are:
- Nullability semantics are adhered in all possible projects. (Not the .NET Framework ones, obviously)
- Newer language constructs like primary constructors, record types are used as much as possible unless it hinders the message of the code example.
Almost all projects target .NET 6. They targeted .NET 5 originally, but .NET 5 support ended in early 2022. With .NET 6 support, you can build the projects using current tools with as little installation work and warnings as possible. The source code is still in parity with the book. I plan on maintaining this repository as easily buildable as possible for readers.
One project requires .NET Framework 4.8 which was required for the migration example.
You can open streetcoder-nowin.slnf
solution filter to filter it out instead of the main
solution file streetcoder.sln
.
You can open and build solution and project files using the latest version of Visual Studio. The Community Edition of Visual Studio is free for personal use, and it's available on Mac too.
You can also use Visual Studio Code with OmniSharp C# extension if you find it more comfortable.
- The different flavors of the same function may have different names in the source
code while they're called the same in the repository. For example,
Contains
function can have variants likeContains2
andContains3
in the source code, but it's listed asContains
in all the listings with different varieties. That's intentional to keep the whole source code compilable without any trouble. Some flavors can use a word-based suffix instead of a numeric one.