.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.
top rated cleaning service Lake Forest ..Scrapbooks are very popular these days. I think that almost... Read More
Microsoft released Service Pack 2 (SP2) for the Windows XP... Read More
Preventive Maintenance (PM) is defined as scheduled work done on... Read More
When reading an article where some term is used often,... Read More
Microsoft Great Plains serves majority of US based horizontal and... Read More
Microsoft Business Solutions CRM is present several years on the... Read More
Collaboration SoftwareCollaboration Software, also known as group collaboration software or... Read More
Microsoft Business Solutions Great Plains, Navision, Axapta, Solomon and CRM... Read More
SyncUp, a file synchronizer is designed to assist the home... Read More
Microsoft CRM customization techniques are very diversified and based on... Read More
MicroWorld Technologies, Inc. the leading solutions provider in the area... Read More
How many steps does it take you to locate and... Read More
What is RAID RECOVERY?RAID stands for Redundant Array of Inexpensive... Read More
Since its release in 1987, QuarkXpress had made an immediate... Read More
Features Additionally, Vista will include many other new features.Aero Vista... Read More
If you've been using MySQL database to store your important... Read More
Small can be beautiful! Working with Knoppix for the past... Read More
Having from five to ten and more favorite screensavers is... Read More
Spyware is like the new technological nuclear weapon on the... Read More
Did you ever want to erase everything on your computer?... Read More
Does Microsoft care for WebmastersIt's always been a problem with... Read More
Bill of Lading is required report for Logistics and Freight... Read More
It could just be me, but my experiences with document... Read More
Homeland security, airport security, Internet security ??" these days we???re... Read More
DBxtra goes ASPGetting to the information hidden within corporate databases... Read More
insured cleaning company Morton Grove ..We would like to give you several situations, when you... Read More
Microsoft Great Plains may be recommended for international freight forwarding... Read More
C/SIDE (Client/Server Integrated Development Environment) - The core of... Read More
Before September 1995, Microsoft Windows was an MS-DOS program. DOS... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
In 2004 Oracle, Inc. made its new step toward J2EE... Read More
Writing software manuals is boring, isn't it? We often think:... Read More
As seeing large number of implementations ? in our case... Read More
The fact that a software tester is a most infamous... Read More
While paper labeling CDs and DVDs may appear to be... Read More
The most important benefit of XML is its simplicity. Though... Read More
Professional services firm cuts costs and improves productivity with integrated... Read More
Microsoft Business Solutions Great Plains has several options to enable... Read More
In the Clinton era the status quo was simple: you... Read More
Whether you are an experienced web programmer or a complete... Read More
Now there are Three Steps To Heaven Just listen and... Read More
Domino server is a buffer between the operation system and... Read More
Whether you are a small consultancy firm, a medium sized... Read More
Features Additionally, Vista will include many other new features.Aero Vista... Read More
While several preventive maintenance software manufacturers offer free trials for... Read More
TikiWiki is open source software - it is written in... Read More
Stealing company information used to be the specialty of spies... Read More
Microsoft Business Solutions Navision is main ERP application for European,... Read More
I like my software simple. If it's too complex or... Read More
There are two approaches for application integration:? Programmer's approach ?... Read More
Software |