// the find
thangchung/clean-code-dotnet
:bathtub: Clean Code concepts and tools adapted for .NET
A port of the clean-code-javascript guide to C#/.NET, walking through naming, functions, SOLID principles, and testing with bad/good code examples. Aimed at developers learning or teaching C# best practices, or teams wanting a shared reference doc to point at in code reviews. Not a library — just examples and explanations.
The bad/good pattern is well-executed and immediately applicable — you can paste examples directly into a PR comment. SOLID section is thorough and the .NET-specific idioms (records, primary constructors, pattern matching) are modern and correct. Collapsible sections keep the README from being overwhelming. The cheatsheet PDFs are a practical bonus for teams.
Last meaningful update was years ago and some examples are starting to show age — for instance, the Singleton anti-pattern section predates modern DI containers being ubiquitous in .NET, making that advice redundant for most readers. There is no coverage of async/await patterns, which is arguably the most common source of bad .NET code in 2024. The repo is documentation-only with no runnable project, so there is nothing to fork and run. Several examples have syntax errors (missing semicolons, `tokens[] = ...` which is not valid C#) that undermine trust in the material.