.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 kaloyani.com - the newest kaloyani.com portal.
scheduled maid service Northbrook ..In order to implement VLANs in a network environment, you'll... Read More
This is a short article, written in question/answer/FAQ style to... Read More
Executive SummaryAn effective plan for entering, cleaning and updating the... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Microsoft Great Plains and Microsoft Retail Management System (Microsoft RMS)... Read More
If you have Microsoft Great Plains and support it for... Read More
The vast majority of us will have, at some point,... Read More
Microsoft Outlook is one of the most widely used software... Read More
NOTE: Please take time to read on - it may... Read More
In today's business world it's all but impossible to escape... Read More
You might think you don't need a firewall... Read More
Whether you are a small consultancy firm, a medium sized... Read More
When you visit department stores and see that majority of... Read More
"Pfishing", sometimes spelled "Phishing", is a word that's used to... Read More
Microsoft Business Solutions Great Plains fits to majority of horizontal... Read More
Think of this, first we had the HAM Radio, then... Read More
Considering whether or not your software company should hire a... Read More
If you company is small or mid-size special products or... Read More
Preventive Maintenance (PM) is defined as scheduled work done on... Read More
There are so many different programs that clutter up your... Read More
Stealing company information used to be the specialty of spies... Read More
Microsoft-Outlook is a pretty amazing program. So much more than... Read More
Ok... Where to start?Well, I guess I will start at... Read More
MicroWorld Technologies, Inc. the leading solutions provider in the area... Read More
When you own a small business, time is money. And... Read More
reliable maid service Highland Park ..A LOT OF UNWANTED FILES.When you uninstall an item of... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
If you feel intimidated when someone tries to teach you... Read More
Trying to figure out a stream in banning one email... Read More
Microsoft Business Solutions Great Plains serves multiple industries in the... Read More
Pirated software is on the increase and now accounts for... Read More
Cyberspace has opened up a new frontier with exciting possibilities... Read More
In a previous article, I wrote about OpenOffice... Read More
Stealing company information used to be the specialty of spies... Read More
Microsoft Outlook is one of the most widely used software... Read More
IntroductionDuring the early years of our modern computer era, very... Read More
Beginning with Domino version R4 it has integration with the... Read More
Once a business idea is selected, it is highly recommended... Read More
Microsoft CRM ? Client Relationship Management package from Microsoft Business... Read More
Almost all new and major brand of PCs come with... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Usually workflow & messaging is realized in CRM and then... Read More
It???s easy to understand why you might be drawn to... Read More
We are in a transition phase in the Managerial Administration... Read More
Microsoft Business Solutions Great Plains has several options to enable... Read More
We would like to give you pluses and minuses of... Read More
Microsoft Business Solutions Great Plains is mid and even corporate... Read More
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
Microsoft Business Solutions is now in process of creating so... Read More
Usually, the easiest way to tell you have spyware is... Read More
Software |