.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.
Tinley Park executive chauffeured services .. Lockport Chicago limo O’HareIf you have Microsoft Great Plains as main accounting and... Read More
Customer Relationship Management, abbreviated "CRM," is the term for a... Read More
Several software companies design programs for preventive maintenance. Most of... Read More
Accounts payable is just one area of office management where... Read More
Adware is a type of Spyware program that displays some... Read More
First we had the original Google search that evolved into... Read More
Fleet Maintenance Management is a critical position in any company... Read More
Microsoft Business Solutions Great Plains, Navision, Axapta, Solomon and CRM... Read More
The stakes are high when considering security, privacy, and savings,... Read More
Microsoft Business Solutions Great Plains is very generic accounting application... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
There are certain pluses and minuses in both cases and... Read More
Executive SummaryAn effective plan for entering, cleaning and updating the... Read More
Buying accounting software is a major investment. It's an important... Read More
This article is the third of a series of articles... Read More
Considering whether or not your software company should hire a... Read More
Microsoft CRM is CRM answer from Microsoft Business Solutions. If... Read More
Microsoft CRM ? Client Relationship Management package from Microsoft Business... Read More
Microsoft Great Plains could be tuned and setup to fit... Read More
One of the things we can be as certain of... Read More
We've all seen the ads on TV for Netzero 3G.... Read More
Software development is a risky business.Many software developers are barely... Read More
In this short FAQ style article we would like to... Read More
Usually, the easiest way to tell you have spyware is... Read More
Former Great Plains Software Dynamics/eEnterprise, and currently Microsoft Business Solutions... Read More
limo Chicago Hickory Hills ..During the years of our consulting practice, which comes back... Read More
It won't matter how effective your WinRunner Team is if... Read More
All of us know that Microsoft bought former Great Plains... Read More
The various resume software offered, particularly on the internet, can... Read More
I have always had a tendency to focus on the... Read More
Writing software manuals is boring, isn't it? We often think:... Read More
SyncUp, a file synchronizer is designed to assist the home... Read More
If you look back to the history, you will see... Read More
Usually, the easiest way to tell you have spyware is... Read More
Microsoft CRM is now on the scene and it is... Read More
Microsoft Business Solutions CRM data conversion deserves FAQ type of... Read More
Microsoft Business Solutions Great Plains serves multiple industries in the... Read More
All your software is stored on a hard-drive. But how... Read More
Microsoft Great Plains has substantial mid-market share in the USA... Read More
Vince Lombardi once said that, "The achievements of an organization... Read More
Some companies that are in need of fleet management may... Read More
Does Microsoft care for WebmastersIt's always been a problem with... Read More
Microsoft CRM is CRM answer from Microsoft Business Solutions.The whole... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Ok... Where to start?Well, I guess I will start at... Read More
Collaboration SoftwareCollaboration Software, also known as group collaboration software or... Read More
We don't think about mainframe software pricing anymore, we just... Read More
The purpose of one of our projects was MS Exchange... Read More
Intro This concise article will tell you in plain English... Read More
GroupwareThe internet is full of 1.5 million to 7 million... Read More
Software |