![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Coupling in C#
Coupling shows the relationship between modules in C# or you can say the interdependence between modules.
There are two types of coupling i.e tight and loose coupling.
Loose Coupling
Loose coupling is preferred since through it changing one class will not affect another class. It reduces dependencies on a class. That would mean you can easily reuse it.
Writing loosely coupled code has the following advantages −
- One module won’t break other modules
- Enhances testability
- Code is easier to maintain
- Gets less affected by changes in other components.
Tight Coupling
In Tight Coupling, the classes and objects are dependent on each other and therefore reduce re-usability of code.
Advertisements