Skip to main content

SOLID - Open Closed - Interface Classes


4. Interfacing Our Classes.
In C#, interface is another way to implement 'Open For Extension' motto, this is the preferable method for implementing loosely coupled clients. Take example code below As we can see from the code above, the client may accept the IPassedToClient interface as an argument, this will introduce some sort like a loosely coupled implementation. We may now extend the classes and change it as long as it inherited from the IPassedToClient interface.

Published on : 10-Jan-2019
Ref no : DTC-WPUB-000103

About Author

My photo
Wan Mohd Adzha CAPM,MCPD,MCSD,MCSE
Passionate about new technology ( Software Engineering ) and how to build,manage and maintain them

Comments