.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.
house cleaning company Glencoe ...MicroWorld Technologies, Inc. the leading solutions provider in the area... Read More
In the real world a "fire wall" is a fireproof... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
Microsoft CRM was designed to be easily customizable. Microsoft CRM... Read More
It is a well known fact that Java as a... Read More
Table of Contents1) Introduction 2) Related Work 3) Framework 4)... Read More
Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More
Just imagine: you are walking, say, towards your car, and... Read More
Language development computer: Computer-based method for aiding language development seems... Read More
You turn on your computer, and it doesn't look quite... Read More
Every day millions of new web documents emerge on the... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
Microsoft Business Solutions is emerging as very attractive vendor for... Read More
(1) Avoid using the same variable again and again for... Read More
Looks like Microsoft Great Plains becomes more and more... Read More
What is Spyware?Spyware monitors your surfing habits and sends the... Read More
Most people don't use Photoshop to its fullest capabilities. Here... Read More
Not all of us have the luxury of working both... Read More
SOFTWARE PIRACY We regularly hear reports... Read More
User interfaces and accessibility are some of the most important... Read More
Google Inc. has launched a new software package that allows... Read More
ERP is the acronym of Enterprise Resource Planning. Multi-module ERP... Read More
Innovative Maintenance Systems (IMS) is one company that offers solutions... Read More
TCO (Total Cost Ownership) is the buzzword in... Read More
1. With mapping software you can create a report that... Read More
kitchen deep cleaning Winnetka ...Sticky Noteshttp://www.deprice.com/stickynote.htmWith StickyNote 9.0, you can create beautiful 3D notes... Read More
Microsoft Business Solutions Great Plains is very good fit for... Read More
RSS (Really Simple Syndication) is a way for a site... Read More
Heard about the Quark "killer"?Adobe InDesign CS2. Will it really... Read More
Fleet Maintenance Management is a critical position in any company... Read More
Music downloads are off the charts! We're listening to digital... Read More
Customer Relationship Management (CRM) is a strategy and processes used... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
This article is the third of a series of articles... Read More
Internet worms. Is your PC infected?If your computer has become... Read More
There are two approaches for application integration:? Programmer's approach ?... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software eEnterprise,... Read More
Have you noticed WordPerfect is gearing up for a comeback... Read More
When Windows fails to boot it is normally caused by... Read More
Microsoft Office program is a programming tool called Visual Basic... Read More
We were recently faced with a decision: either to let... Read More
Need help making sense of algebra? Have algebra lectures in... Read More
"Pfishing", sometimes spelled "Phishing", is a word that's used to... Read More
Many reasons made GBM a unanimous choice for experts, one... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
Finding the best spyware removers to detect and remove spyware... Read More
It is possible that if one avoided all sources of... Read More
Microsoft CRM is CRM answer from Microsoft Business Solutions.The whole... Read More
Let's first look at your ERP system selection (without Retail... Read More
Microsoft Business Solutions Great Plains serves multiple industries in the... Read More
Software |