.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.
no-contract cleaning service Glenview ..Are you a database professional? Do you work with a... Read More
Microsoft Business Solutions Small Business Manager is Great Plains Dexterity... Read More
Microsoft Business Solutions Great Plains has Project Accounting module where... Read More
Microsoft Business Solutions Great Plains is very generic accounting application... Read More
The purpose of Project Management Software is to provide an... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
When you think... Read More
Homeland security, airport security, Internet security ??" these days we???re... Read More
C++ Function templates are those functions which can handle different... Read More
We would like to give you pluses and minuses of... Read More
Words we choose to describe things and phenomena often show... Read More
I have always had a tendency to focus on the... Read More
This is a short article, written in question/answer/FAQ style to... Read More
It could just be me, but my experiences with document... Read More
C/SIDE (Client/Server Integrated Development Environment) - The core of... Read More
Microsoft PowerPoint has dramatically changed the way in which academic... Read More
Microsoft Business Solutions Navision is main ERP application for European,... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Accounts payable is just one area of office management where... Read More
IntroductionDuring the early years of our modern computer era, very... Read More
What is Colossus?Colossus is software licensed to about twenty-five insurance... Read More
Internet worms. Is your PC infected?If your computer has become... Read More
Microsoft Business Solutions Great Plains is very popular ERP platform... Read More
Here is some free software tools to help you build... Read More
Think of this, first we had the HAM Radio, then... Read More
house cleaning company Glencoe ..Microsoft Business Solutions main middle market ERP application - Microsoft... Read More
Are you one of those people that keeps track of... Read More
Microsoft Great Plains ? ERM from Microsoft Business Solutions and... Read More
Just stress testing one of the latest Linux distributions. Been... Read More
Have you ever noticed that when you look at your... Read More
As Mozilla Firefox nears 10% market share, with well over... Read More
An integral part of any quality CRM system is lead... Read More
If you are software developer or database administrator - we... Read More
Microsoft Business Solutions Great Plains is very popular ERP platform... Read More
For a long time now Microsoft's Internet Explorer has ruled... Read More
If you have Microsoft Great Plains as main accounting and... Read More
When you need a phone number, you do a quick... Read More
Microsoft CRM is now on the scene and it is... Read More
Scrapbooks are very popular these days. I think that almost... Read More
Intro This concise article will tell you in plain English... Read More
Anti-virus software is used to find, remove or fix files... Read More
XML Server can be a Web Server that stores the... Read More
Executive SummaryAn effective plan for entering, cleaning and updating the... Read More
Many reasons made GBM a unanimous choice for experts, one... Read More
One of the things we can be as certain of... Read More
Microsoft Great Plains might be considered as ERP platform to... Read More
Make-or-Break Factors in Success and ProfitabilityFor quick printers, estimating can... Read More
Midsize business or non-profit organization should decide if one-vendor solution... Read More
What is Groupware?Have you ever had to manage document collaboration... Read More
Microsoft Great Plains, Navision, Solomon and Axapta are Microsoft Business... Read More
Software |