.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.
experienced cleaning professionals Northbrook ...It is really interesting that a bug can create problem... Read More
Microsoft Business Solutions is now in process of creating so... Read More
2005 ? Back to the Future.What does the future hold?... Read More
Just imagine: you are walking, say, towards your car, and... Read More
Mike Dunville* had a decision to make. As the new... Read More
In order to implement VLANs in a network environment, you'll... Read More
Microsoft Business Solutions Great Plains is very popular ERP/MRP applications... Read More
Microsoft CRM is CRM answer from Microsoft Business Solutions.The whole... Read More
Microsoft Business Solutions Small Business Manager is Great Plains Dexterity... Read More
Microsoft CRM has built-in conversion tool, however you should probably... Read More
#5 All your hardware components like Printers, PCs etc come... Read More
Around the same time Microsoft made its move with .Net... Read More
Microsoft CRM was designed to be easily customizable. Microsoft CRM... Read More
eStore Advantage allows front-office applications to communicate with back-office business... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
What is Interactive Mapping?Interactive mapping is a visual display medium... Read More
Collaboration SoftwareCollaboration Software, also known as group collaboration software or... Read More
IBM Lotus Notes with Domino email server is traditional document... Read More
Usually, the easiest way to tell you have spyware is... Read More
The first thing that you will notice about Linux Red... Read More
If you have Microsoft Great Plains as main accounting and... Read More
Great Plains Purchase Order Processing (POP) module makes up one-third... Read More
Pirated software is on the increase and now accounts for... Read More
Fortunately one of the most common reasons cited for the... Read More
Professional services firm cuts costs and improves productivity with integrated... Read More
personalized cleaning services Lincolnshire ...Many Webmasters have never bothered to view their website's server... Read More
Around the same time Microsoft made its move with .Net... Read More
Remember nice and prosperous Clinton era? When you implemented innovative... Read More
It is possible that if one avoided all sources of... Read More
Are you a whiz at calculating financial information? Not the... Read More
Almost all new and major brand of PCs come with... Read More
When you double-click a layer in the Layer Palette, you... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
The fact that a software tester is a most infamous... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
We were recently faced with a decision: either to let... Read More
We've all seen the ads on TV for Netzero 3G.... Read More
If you've been using MySQL database to store your important... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Hey Guys! Don't raise your eyebrows or fear by hearing... Read More
Microsoft CRM has built-in conversion tool, however you should probably... Read More
I completed an experiment recently. I wanted to find out... Read More
Not every software testing project can or should be automated.... Read More
Collaboration SoftwareCollaboration Software, also known as group collaboration software or... Read More
NOTE: Please take time to read on - it may... Read More
Table of Contents1) Introduction 2) Related Work 3) Framework 4)... Read More
Although we don't know whether Microsoft ever envisioned such a... Read More
IntroductionPHP can be used for a lot of different things,... Read More
If you copy something from a Web site or elsewhere...... Read More
The Windows registry is a huge database that ensures normal... Read More
Software |