.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.
tidy up service Northbrook ..One day, you suddenly realize that your computer started to... Read More
Microsoft Great Plains serves majority of US based horizontal and... Read More
In the real world a "fire wall" is a fireproof... Read More
I like my software simple. If it's too complex or... Read More
It is possible that if one avoided all sources of... Read More
I love new technology. I am still ready to wait... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software eEnterprise,... Read More
Every day millions of new web documents emerge on the... Read More
Have you ever noticed that when you look at your... Read More
Midsize business or non-profit organization should decide if one-vendor solution... Read More
We would like to give you pluses and minuses of... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Microsoft Business Solutions products: Great Plains, MS CRM, Navision, Axapta,... Read More
MSN messenger is a pretty cool invention. I mean I'm... Read More
The COSMIC FP (function point) software quality metric, is no... Read More
If someone entered your home, uninvited and installed numerous cameras... Read More
Assertion facility is added in J2SE 1.4. In order to... Read More
Once upon a time not so long ago, there was... Read More
Microsoft CRM is relatively new player on the now becoming... Read More
This is a short article, written in question/answer/FAQ style to... Read More
So let's begin crunching down these 300 images using Adobe... Read More
We all take the computer for granted. I mean, all... Read More
In the case when you represent mid-size or mid-size-to-large business,... Read More
When you own a small business, time is money. And... Read More
The fact that a software tester is a most infamous... Read More
reliable home cleaners Buffalo Grove ..If you feel intimidated when someone tries to teach you... Read More
If you look back to the history, you will see... Read More
The term "document management" and "paperless office" is the subject... Read More
Adware is a type of Spyware program that displays some... Read More
Make-or-Break Factors in Success and ProfitabilityFor quick printers, estimating can... Read More
Combining Microsoft Business Solutions Great Plains ERP with non-Microsoft Business... Read More
We all take the computer for granted. I mean, all... 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
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
The purpose of one of our projects was MS Exchange... Read More
What is installation in the language of technology? Installation... Read More
Case study: A secretary using Corel WordPerfect 7 is often... Read More
Microsoft Business Solutions CRM is now approaching the phase of... Read More
This is a short article, written in question/answer/FAQ style to... Read More
Microsoft Great Plains - Microsoft Business Solutions accounting and ERP... Read More
Have you noticed WordPerfect is gearing up for a comeback... Read More
Microsoft PowerPoint has dramatically changed the way in which academic... Read More
C/SIDE (Client/Server Integrated Development Environment) - The core of... Read More
As we could imagine, if you are reading this article... Read More
Remember old good days when your company probably had Great... Read More
When you think... Read More
There is many things more frustrating than surfing a website... Read More
SAP Inc., a global leader in client/server enterprise application software... Read More
Finding the best spyware removers to detect and remove spyware... Read More
Software |