.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.
detailed home cleaning Lake Forest ..The Internet is reshaping every form of communications medium, and... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
Microsoft Great Plains, former Great Plains Software Dynamics / eEnterprise... Read More
Are you one of those people that keeps track of... Read More
Whether you are an experienced web programmer or a complete... Read More
Our company, Novaprof Inc., developed unique software - DB Integration.... Read More
IBM Lotus Notes with Domino email server is traditional document... Read More
The first topic we are going to discuss... Read More
If you've been using MySQL database to store your important... Read More
Microsoft Business Solutions Great Plains was historically designed to serve... Read More
While several preventive maintenance software manufacturers offer free trials for... Read More
Microsoft Business Solutions Great Plains is very generic accounting application... Read More
DBxtra is a powerful query and reporting tool that hides... Read More
If you have Microsoft Great Plains as main accounting and... Read More
We don't think about mainframe software pricing anymore, we just... Read More
For a windows user like me, just can watch with... Read More
Logistics automation is often considered as barcoding extension to Sales... Read More
Now there are Three Steps To Heaven Just listen and... Read More
Creating a new markup language.Introduction.General Reuse Markup Langauge, or GRML,... Read More
There are two approaches for application integration:? Programmer's approach ?... Read More
Did you ever give a thought to the number of... Read More
The term "document management" and "paperless office" is the subject... Read More
Before being able to choose a secure Internet communication system,... Read More
Let us give you - developer some hints in the... Read More
I have recently created my first Php program. I wanted... Read More
trusted cleaning company Des Plaines ..Microsoft CRM is relatively new player on the now becoming... Read More
Introduction: The creating of a computer program involves a number... Read More
I have always had a tendency to focus on the... Read More
In a previous article, I wrote about OpenOffice... Read More
Although statistics often is blamed for various deadly sins --... Read More
Microsoft Business Solutions Great Plains has substantial market share among... Read More
When making a decision to buy any piece of software... Read More
Microsoft Retail Management (RMS) and Microsoft Great Plains are retail... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Microsoft Business Solutions main middle market ERP application - Microsoft... Read More
Several years ago Microsoft purchased Great Plains Software, then Navision... Read More
Domino server is a buffer between the operation system and... Read More
GroupwareThe internet is full of 1.5 million to 7 million... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Music downloads are off the charts! We're listening to digital... Read More
Ok... Where to start?Well, I guess I will start at... Read More
Adware is a type of Spyware program that displays some... Read More
XML parser is a software module to read documents and... Read More
Most people understand that the "hardware" part of their computer... Read More
This article is the fourth of a series of articles... Read More
The Microsoft system preparation utility for Windows 2000 is a... Read More
Are you lost in the mess of documents that get... Read More
Microsoft Great Plains - Microsoft Business Solutions accounting and ERP... Read More
Spyware is software or hardware installed on a computer without... Read More
Are you a whiz at calculating financial information? Not the... Read More
Software |