且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在VB .Net中可以进行多重继承吗?

更新时间:2023-09-23 19:26:46

简短答案:否

稍长的答案:是的,如果您继承多个接口和一个基类.由于这通常是MI(您想要实现多个接口)的原因,因此通常就足够了.但是,在少数情况下,真实" MI很有用,.NET会阻止您这样做.

Slightly longer answer: Yes, if you inherit multiple interfaces, and a single base class. Since this is usually the reason for MI (you want to implement multiple interfaces), it's usually enough. However, in those rare instances where "real" MI is useful, .NET prevents you from doing it.