.NET platform does not support multiple inheritance. Do not confuse multilevel inheritance with multiple inheritance. With multiple inheritance we can have a subclass that inherits from two classes at the same time.
Let's suppose we have an application that has a class Customers and another class Vendors. If you wanted to combine these two classes into one CustomerVendor class it would be a combination of Customers and Vendors just like the diagram below.
Please copy the following URL into your browser to view the diagram: http://www.vbprofs.com/images/Article Images/ThomasArt1.gif
In the above diagram we see how the CustomerVendor class inherits from both of those classes.
Multiple inheritance is complex and can be dangerous. The advantages of code re-usage prevail over complexity is up to your choice.
Multiple inheritance is not supported by VB.NET or .Net platform. Instead of multiple inheritance we can use multiple interfaces to achieve similar effect to multiple inheritance.
In VB.NET all objects have a primary or native interface, which is composed of properties, events, methods or member variables declared using Public keyword. Objects can implement also secondary interfaces by using Implement keyword.
Sometimes it is helpful for an object to have more than one interface, allowing us to interact with the object in different ways. Inheritance allow us to create subclasses that are a specialized case of the base class.
Example
Sometimes we have a group of objects that are not the similar, but we want to handle them the same manner. We want all the objects to act as if they are the same, even though they are different.
We can have some different objects in an application, such as customer, product, invoice etc. Each object would have a default interface appropriate to each individual object, and each of them is a different class. No natural inheritance is implied between these classes. Let's suppose we want to print a document for each type of object. In this case we'd like to make them all act as printable object. To accomplish this we can define a generic interface that would enable generating a printed document. By implementing a common interface we are able to write a routine that accepts any object that implements a printed document.
To conclude, by implementing multiple interfaces in VB.NET , we can achieve a similar effect to that of multiple inheritance.
Thomas is an experienced Visual Basic developer, with expertise of 7+ years developing especially financial applications. His main IT skills are VB, SQL, Crystal Reports - should you need a Visual Basic developer for your projects feel free to contact Thomas through his personal website Kaloyani.com or through VBprofs.com - the newest Visual Basic and VB.NET resources portal.
![]() |
|
![]() |
|
![]() |
|
![]() |
Adware is a type of Spyware program that displays some... Read More
Vince Lombardi once said that, "The achievements of an organization... Read More
Microsoft Client Relation Management system (Microsoft CRM) and Microsoft RMS... Read More
Microsoft Business Solutions ? Great Plains has captured the US... Read More
An operating system (abbreviated OS) is essentially the path through... Read More
Words we choose to describe things and phenomena often show... Read More
When you own a small business, time is money. And... Read More
Microsoft Great Plains has full-featured Manufacturing suite of modules: Capacity... Read More
Great Plains Purchase Order Processing (POP) module makes up one-third... Read More
Several years ago Microsoft purchased Great Plains Software, then Navision... Read More
Microsoft CRM is new player on the CRM software... Read More
Before being able to choose a secure Internet communication system,... Read More
Microsoft Business Solutions main middle market ERP application - Microsoft... Read More
Microsoft Business Solutions is now in process of creating so... Read More
With the advent of 'Service Pack 2' for Windows XP... Read More
This article will not attempt to advocate the use of... Read More
Imagine something that follows you home and sets itself up... Read More
It is a well known fact that Java as a... Read More
C/SIDE (Client/Server Integrated Development Environment) - The core of... Read More
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
MS CRM is very close to document workflow automation, including... Read More
Microsoft Great Plains is main accounting / ERP application... Read More
If you have Microsoft Great Plains and support it for... Read More
In our small article we'll consider Microsoft Business Solutions Great... Read More
As seeing large number of implementations ? in our case... Read More
Sticky Noteshttp://www.deprice.com/stickynote.htmWith StickyNote 9.0, you can create beautiful 3D notes... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
The cornerstone of successful automated office systems is the ability... Read More
Microsoft Office program is a programming tool called Visual Basic... Read More
It's no secret that software companies operate in a very... Read More
Just imagine: you are walking, say, towards your car, and... Read More
Microsoft Business Solutions CRM is now approaching the phase of... Read More
The java programming language is becoming more and more popular... Read More
This article will not attempt to advocate the use of... Read More
Microsoft Business Solutions Great Plains is very good fit for... Read More
Today's business world is fast-paced. No matter what it is... Read More
We were recently faced with a decision: either to let... Read More
If someone entered your home, uninvited and installed numerous cameras... Read More
When Great Plains Software was designing and developing Great Plains... Read More
What is Tripwire?Tripwire is a form intrusion detection system (IDS)... Read More
What is Spyware?Spyware monitors your surfing habits and sends the... Read More
If you are software developer or database administrator - we... Read More
A UNIX Shell is in simplest terms, a command line... Read More
Your computer cost you from hundreds to thousands of dollars,... Read More
XML parser is a software module to read documents and... Read More
Great Plains Purchase Order Processing (POP) module makes up one-third... Read More
The cornerstone of successful automated office systems is the ability... Read More
Microsoft Business Solutions CRM and IBM Lotus Notes Domino, being... Read More
Since Version 8.0 Microsoft Business Solutions Great Plains & Great... Read More
XML Server can be a Web Server that stores the... Read More
IBM Lotus Notes with Domino email server is traditional document... Read More
Since technology changes so quickly, it is hard to begin... Read More
SyncUp, a file synchronizer is designed to assist the home... Read More
Java has come along a long way. Many would agree... Read More
Before being able to choose a secure Internet communication system,... Read More
Not all of us have the luxury of working both... Read More
OEComplete is a utility for managing the personal information of... Read More
Think of this, first we had the HAM Radio, then... Read More
Microsoft Business Solutions Great Plains version 8.5, 8.0, 7.5, Great... Read More
According to a survey conducted by InfoTrends/CAP Ventures entitled "Content-Centric... Read More
Domino server is a buffer between the operation system and... Read More
Most people understand that the "hardware" part of their computer... Read More
With this small article we are continuing Microsoft Business Solutions... Read More
Microsoft Outlook is one of the most widely used software... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Several software companies design programs for preventive maintenance. Most of... Read More
Software |