Advantages and Disadvantages of Interfaces In C#

One drawback of using interfaces is that it makes the code more complicated to understand.

Advantage of using Interface

The major advantage of using interfaces is that you add an extra dimension of communication to your design. Instead of only accessing classes through class inheritance, with interfaces you can make a backdoor, open for classes implementing a specific interface.

This construct makes the software flexible for future changes. The client using your class through a method argument or instance variable will not have to know anything about the class, but that it implements a specific interface.

Meaning: all classes implementing a given interface can be used. Uses of the interface construct decouple your design, resulting in low coupling and high cohesion. Low coupling means that when classes are decoupled they do not depend closely on each other. The chance of failures, faults or errors getting thrown when you make changes to existing code will be lower when the classes are decoupled. Often you do not have to change existing code.

All you do is add new code. Design of interfaces and their use in design patterns is at a more abstract level compared to the abstract level where your code is at. In fact, design patterns and the use of interface, abstracts the code itself. It means that if you have your design ready you can make the source code either in Java or C# directly from the design.