.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.
recurring maid service Wilmette ..Microsoft Business Solutions Great Plains is Dexterity-written application and currently... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
Microsoft Business Solutions CRM is web-based CRM application, deploying all... Read More
Beginning with Domino version R4 it has integration with the... Read More
eStore Advantage allows front-office applications to communicate with back-office business... Read More
With the advent of 'Service Pack 2' for Windows XP... Read More
Our opinion is based on our Microsoft Business Solutions Great... Read More
Microsoft Great Plains is one of the Microsoft Business Solutions... Read More
In the Clinton era the status quo was simple: you... Read More
The most important things you can do for your computer... Read More
Designing without tables by using CSS layouts is fast becoming... Read More
When you double-click a layer in the Layer Palette, you... Read More
Several software companies design programs for preventive maintenance. Most of... Read More
IntroductionPHP can be used for a lot of different things,... Read More
A few months back I really got sick of my... Read More
This article is the third of a series of articles... Read More
In a previous article, I wrote about OpenOffice... Read More
XML Server can be a Web Server that stores the... Read More
The java programming language is becoming more and more popular... Read More
There are many commands that are used in linux on... Read More
Formatting and reinstalling windows 98 is very easy if you... Read More
Introduction To ISDN, Part III: Configuring PPP PAP AuthenticationNow we... Read More
In today's business world it's all but impossible to escape... Read More
Once upon a time not so long ago, there was... Read More
There are certain pluses and minuses in both cases and... Read More
last minute cleaning help Highland Park ..Microsoft Business Solutions ? Navision is an integrated solution for... Read More
Spyware is like the new technological nuclear weapon on the... Read More
Microsoft Business Solutions Great Plains, Navision, Axapta, Solomon and CRM... Read More
Microsoft released Service Pack 2 (SP2) for the Windows XP... Read More
Table of Contents1) Introduction 2) Related Work 3) Framework 4)... Read More
It's no secret that software companies operate in a very... Read More
Three highly respected names in Human Resources have joined forces... Read More
In our case ? we serve Microsoft Business Solutions ERP... Read More
Just when you thought you were Web savvy, one more... Read More
This article is the first of a series of articles... Read More
Whether you have used Microsoft Word for years, have just... Read More
What is Colossus?Colossus is software licensed to about twenty-five insurance... Read More
The title of "software engineer" has got to be among... Read More
Microsoft Business Solutions Great Plains has substantial market share among... Read More
So let's begin crunching down these 300 images using Adobe... Read More
Before September of 1995, Microsoft ignored the Internet because their... Read More
With this small article we are continuing Microsoft Business Solutions... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
Microsoft Great Plains, former Great Plains Software Dynamics / eEnterprise... Read More
If you are in a business that passes documents around... Read More
Are Spreadsheets Robbing your Enterprise of Competitive Advantage?'90% of "average"... Read More
Microsoft Business Solutions CRM proved to be reliable solution in... Read More
Your computer cost you from hundreds to thousands of dollars,... Read More
Stealing company information used to be the specialty of spies... Read More
Microsoft Business Solutions CRM and IBM Lotus Notes Domino, being... Read More
Software |