.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.
move in cleaning service Mundelein ..Anyone who has ever used Microsoft Word knows that it... Read More
Each Industry and market niche has business specific and unique... Read More
Microsoft Business Solutions Great Plains was historically designed to serve... Read More
The world of small business accounting software can be a... Read More
IBM Lotus Notes with Domino email server is traditional document... Read More
Before September 1995, Microsoft Windows was an MS-DOS program. DOS... Read More
Whether you are an experienced web programmer or a complete... Read More
If you have been using the Internet for any amount... Read More
Is Photoshop CS2 worth the upgrade? You bet it is!... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software eEnterprise,... Read More
An operating system (abbreviated OS) is essentially the path through... Read More
Microsoft-Outlook is a pretty amazing program. So much more than... Read More
Microsoft Business Solutions Great Plains and MS CRM (client relation... Read More
Former Great Plains Software Dynamics/eEnterprise, and currently Microsoft Business Solutions... Read More
Need software to record your voice, streaming audio or musical... Read More
The fact that a software tester is a most infamous... Read More
Before being able to choose a secure Internet communication system,... Read More
Fundraising software lets you connect with donors in a way... Read More
The COSMIC FP (function point) software quality metric, is no... Read More
Did you ever give a thought to the number of... Read More
For those who still don't know, Microsoft Publisher helps computer... Read More
Now is the time to look at an alternative to... Read More
What is Tripwire?Tripwire is a form intrusion detection system (IDS)... Read More
What is Software?Software is a set of instruction written to... Read More
With this small article we are continuing Microsoft Business Solutions... Read More
insured cleaning company Highland Park ..Do you want to get quality software at a reasonable... Read More
In the previous ISDN article, we looked at how and... Read More
In linux, one of great commands for finding out information... Read More
SyncUp, a file synchronizer is designed to assist the home... Read More
Icons are used everywhere; right from software applications, to internet... Read More
Table of Contents1) Introduction 2) Related Work 3) Framework 4)... Read More
OEComplete is a utility for managing the personal information of... Read More
What is Snort?Snort is an open source network intrusion detection... Read More
Writing software manuals is boring, isn't it? We often think:... Read More
1. What determines the software price? Is it Per Seat... Read More
Just the thought of a duel-boot scares many people away,... Read More
Well, even if the combination might look very unusual, we... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
Microsoft Great Plains is becoming more and more popular and... Read More
Whether you have used Microsoft Word for years, have just... Read More
What is Groupware?Have you ever had to manage document collaboration... Read More
When you need a phone number, you do a quick... Read More
I started using PIP (Picture It Publishing) Platinum 2002 right... Read More
In this short FAQ style article we would like to... Read More
As we could imagine, if you are reading this article... Read More
Upgrading. Downtime. Maintenance. Hardware obsolescence. Implementation issues. The litany of... Read More
In the Clinton era the status quo was simple: you... Read More
Before being able to choose a secure Internet communication system,... Read More
Some introduction into Great Plains Software products, now Microsoft Business... Read More
Microsoft Great Plains is main Microsoft Business Solutions product, targeted... Read More
Software |