Skip to content

Side-by-side C# examples demonstrating correct and incorrect applications of the SOLID principles. Perfect for quick learning and design reference.

License

Notifications You must be signed in to change notification settings

mf-rl/SOLID.Principles.Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 SOLID Principles in C# – Correct vs Incorrect Implementations

.NET C# License

This project demonstrates the five SOLID principles of object-oriented design in C# through clear, side-by-side examples. Each principle is organized into its own folder, containing both Incorrect (violating the principle) and Correct (properly applying the principle) implementations.

🎯 What are SOLID Principles?

SOLID is an acronym for five design principles that make software designs more understandable, flexible, and maintainable:

📂 Project Structure

SolidPrinciplesDemo/
├── 1.SingleResponsibility/
│   ├── Correct.cs
│   └── Incorrect.cs
├── 2.OpenClosed/
│   ├── Correct.cs
│   └── Incorrect.cs
├── 3.LiskovSubstitution/
│   ├── Correct.cs
│   └── Incorrect.cs
├── 4.InterfaceSegregation/
│   ├── Correct.cs
│   └── Incorrect.cs
└── 5.DependencyInversion/
    ├── Correct.cs
    └── Incorrect.cs

📖 Learning Resources

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Each section provides simple, easy-to-understand C# code snippets to help you quickly grasp both the mistakes and best practices when applying SOLID principles.

About

Side-by-side C# examples demonstrating correct and incorrect applications of the SOLID principles. Perfect for quick learning and design reference.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages