4 posts about clean code C# by 4 contributors.
Know clean code C#? Share what you know with developers who are learning it.
Learn how to identify SRP and OCP violations in C# using an Account example, and improve the design with polymorphism and the Strategy Pattern.
This article provides a complete and descriptive guide to the Repository Pattern in C# and ASP.NET Core. It explains what the repository pattern is, why it is used, and how it helps achieve clean architecture, separation of concerns, and maintainability. With detailed explanations, step-by-step implementation, generic and specific repositories, code examples, dependency injection usage, best practices, and real-world scenarios, this guide is ideal for beginners and advanced developers building scalable and testable .NET applications.
Elevate your C# programming skills by addressing common pitfalls that lead to inefficient and buggy code. This article highlights 10 essential fixes, including avoiding magic strings, excessive comments, manual string concatenation, empty catch blocks, and tightly coupled code. Learn to write cleaner, more maintainable, and robust C# applications by adopting best practices for error handling, dependency injection, and code organization.
Master the SOLID principles in C# with practical examples! Learn how Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion enhance code maintainability, scalability, and testability. Elevate your C# skills and write cleaner, more robust object-oriented applications. Discover how to avoid common pitfalls and build a solid foundation for future development. Get ready to explore Dependency Injection in our next article!
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only16days leftRegisterPublish an article in this category and earn +1,000 SHARP when it is approved.
Write an article