Multiple Inheritance in C#

后端 未结 15 2043
醉酒成梦
醉酒成梦 2020-11-22 03:03

Since multiple inheritance is bad (it makes the source more complicated) C# does not provide such a pattern directly. But sometimes it would be helpful to have this ability.

15条回答
  •  清歌不尽
    2020-11-22 03:20

    MI is NOT bad, everybody that has (seriously) used it LOVES it and it doesNOT complicate the code! At least not anymore than other constructs may complicate the code. Bad code is bad code regardless of whether or not MI is in the picture.

    Anyway, I've got a nice little solution for Multiple Inheritance I wanted to share, it's at; http://ra-ajax.org/lsp-liskov-substitution-principle-to-be-or-not-to-be.blog or you can follow the link in my sig... :)

提交回复
热议问题