Skip to main content
Post Made Community Wiki by James P.
Source Link
Daniel B
  • 6.2k
  • 1
  • 25
  • 30

It's difficult for me to imagine clean, object-oriented C# code without the use of interfaces. You use them whenever you wish to enforce the availability of certain functionality without forcing classes to inherit from a specific base class, and this allows your code to have the relevant level of (low) coupling.

I don't agree that multiple inheritence is better than having interfaces, even before we get to arguing that multiple inheritence comes with it's own set of pains. Interfaces are a basic tool for enabling polymorphism and code reuse, what more does one need?