Clean Code .NET is a guide to applying clean code principles adapted for the .NET and .NET Core ecosystem.
The project addresses the challenge of writing readable, reusable, and refactorable code in .NET by translating Robert C. Martin's Clean Code principles into language-specific guidance. It covers practical topics including naming conventions, variable declaration, function design, object and data structure organization, class design, SOLID principles, testing strategies, concurrency patterns, error handling, code formatting, comments, and related best practices. The guide presents bad and good code examples side by side to illustrate each principle, making the concepts concrete and immediately applicable.
Developers working on .NET or .NET Core projects should consider this guide if they want to improve code quality and maintainability within their team. It works best as a reference during code reviews and team discussions about coding standards, helping establish shared expectations around clean code practices. The guide is explicitly positioned as a set of guidelines rather than strict rules, acknowledging that not every principle will apply universally or be agreed upon by all teams. It is inspired by similar clean code collections for other languages, adapting those concepts to .NET idioms and conventions.
The project maintains a structured, comprehensive reference with expandable sections covering distinct aspects of code quality. The repository includes links to related resources, style guides, tools, and cheatsheets, positioning itself as a curated entry point into the broader clean code conversation for the .NET community.