Multiple Inheritance in C#

后端 未结 15 1814
醉酒成梦
醉酒成梦 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:14

    i know i know even though its not allowed and so on, sometime u actualy need it so for the those:

    class a {}
    class b : a {}
    class c : b {}
    

    like in my case i wanted to do this class b : Form (yep the windows.forms) class c : b {}

    cause half of the function were identical and with interface u must rewrite them all

提交回复
热议问题