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.
Ref no : DTC-WPUB-000103
Comments
Post a Comment