Good Case For Interfaces

前端 未结 17 1974
眼角桃花
眼角桃花 2020-12-14 04:29

I work at a company where some require justification for the use of an Interface in our code (Visual Studio C# 3.5).

I would like to ask for an Iron Clad reasoning t

17条回答
  •  囚心锁ツ
    2020-12-14 05:20

    • You can implement multiple interfaces. You cannot inherit from multiple classes.
    • ..that's it. The points others are making about code decoupling and test-driven development don't get to the crux of the matter because you can do those things with abstract classes too.

提交回复
热议问题