Why classes tend to be defined as interface nowadays?

前端 未结 5 617
囚心锁ツ
囚心锁ツ 2020-12-17 16:16

These 2-3 last years, many projects I see, like Cuyahoga open source C# CMS, tends to define persistent and non persistent classes as Interface. Why? Is there a

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-17 17:10

    Interfaces have the advantage that they make you independent from the implementation, which is a good thing.

提交回复
热议问题