why does vb.net not support multiple inheritance?

前端 未结 6 1336
夕颜
夕颜 2021-01-07 12:33

I\'ve seen some discussion on why c# does not implement multiple inheritance but very little as to why it isn\'t supported in vb. I understand that both c# and vb are compi

6条回答
  •  北海茫月
    2021-01-07 12:52

    All dotNET languages share a Common Type System, and that CTS does not support multiple inheritance. A specific language like VB or C# cannot add this on its own, it would become incompatible with the rest of dotNET. At the most a language might select to ignore/hide such a feature.

    I don't know exactly why this wasn't included but it's worth noticing that most languages don't support it. I only know of C++, and while the basic application is simple and sometimes useful it also bring a boatload of special syntax and rules along. Not everybody considers it worth the price.

提交回复
热议问题