.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.
express cleaning service Arlington Heights ..Programming Help for BeginnersWe write programs to instruct computers. When... Read More
This article is for advanced Microsoft CRM SDK C# developers.... Read More
Your computer cost you from hundreds to thousands of dollars,... Read More
The java programming language is becoming more and more popular... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
What is a Web Database?A web database is a database... Read More
C/SIDE (Client/Server Integrated Development Environment) - The core of... Read More
We would like to give you pluses and minuses of... Read More
Introduction To ISDN, Part III: Configuring PPP PAP AuthenticationNow we... Read More
Microsoft Retail Management (RMS) and Microsoft Great Plains are retail... Read More
1. With mapping software you can create a report that... Read More
Our hosted solution allow you to run your own search... Read More
In the real world a "fire wall" is a fireproof... Read More
Remember back in the days where screensavers were the coolest... Read More
If you've been using MySQL database to store your important... Read More
There are many commands that are used in linux on... Read More
Microsoft Business Solutions Great Plains is written in Great Plains... Read More
When Windows fails to boot it is normally caused by... Read More
Heard about the Quark "killer"?Adobe InDesign CS2. Will it really... Read More
Microsoft Great Plains serves majority of US based horizontal and... Read More
Microsoft Great Plains and Microsoft Retail Management System (Microsoft RMS)... Read More
Microsoft Business Solutions Great Plains is very popular ERP platform... Read More
With this small article we are continuing Microsoft Business Solutions... Read More
Customer Relationship Management or CRM is a combination of enterprise... Read More
Microsoft Great Plains has full-featured Manufacturing suite of modules: Capacity... Read More
tidy up service Arlington Heights ..Usually, the easiest way to tell you have spyware is... Read More
Microsoft Business Solutions Great Plains serves to the wide spectrum... Read More
Homeland security, airport security, Internet security ??" these days we???re... Read More
Midsize business or non-profit organization should decide if one-vendor solution... Read More
So, why should you use any O/R mapping tool? I... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
Introduction To ISDN, Part III: Configuring PPP PAP AuthenticationNow we... Read More
Looking at all the ads which promise to get rid... Read More
Domino server is a buffer between the operation system and... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
For those who still don't know, Microsoft Publisher helps computer... Read More
Executive SummaryAn effective plan for entering, cleaning and updating the... Read More
Mike Dunville* had a decision to make. As the new... Read More
How many steps does it take you to locate and... Read More
Former Great Plains Software Dynamics/eEnterprise and currently Microsoft Business Solutions... Read More
IntroductionDuring the early years of our modern computer era, very... Read More
As Mozilla Firefox nears 10% market share, with well over... Read More
Microsoft Business Solutions Great Plains is very popular ERP/MRP applications... Read More
And kill the best layout software in the process of... Read More
When my daughter was getting into AOL instant messaging (AIM)... Read More
So let's begin crunching down these 300 images using Adobe... Read More
Task Manager is a Windows system utility that displays thetasks... Read More
Customer Relationship Management (CRM) is a strategy and processes used... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Microsoft Retail Management (RMS) and Microsoft Great Plains are retail... Read More
Software |