Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is multiple inheritance possible in VB .Net?

Is multiple inheritance possible in VB .Net? If so, what is the syntax?

like image 619
Steve Duitsman Avatar asked Dec 08 '08 22:12

Steve Duitsman


People also ask

Is multiple inheritance is possible?

The Java programming language supports multiple inheritance of type, which is the ability of a class to implement more than one interface. An object can have multiple types: the type of its own class and the types of all the interfaces that the class implements.

Is multiple inheritance possible in oops?

Multiple inheritance is a feature of some object-oriented computer programming languages in which an object or class can inherit features from more than one parent object or parent class. It is distinct from single inheritance, where an object or class may only inherit from one particular object or class.


1 Answers

Short answer: No

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.

like image 160
Harper Shelby Avatar answered Nov 16 '22 00:11

Harper Shelby