.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 ..If you company is small or mid-size special products or... Read More
Following tips help you to learn a software in lesser... Read More
No matter how much you enjoy your favorite screensavers, sometimes... Read More
Microsoft Word is one of the most popular office applications... Read More
In this small article we will be looking at the... Read More
(1) Avoid using the same variable again and again for... Read More
Upgrading. Downtime. Maintenance. Hardware obsolescence. Implementation issues. The litany of... Read More
Did you ever give a thought to the number of... Read More
The major reason I recommend getting your hands on real... Read More
Should one use Windows Update?This topic has good and valid... Read More
IntroductionPHP can be used for a lot of different things,... Read More
ERP is the acronym of Enterprise Resource Planning. Multi-module ERP... Read More
Microsoft Business Solutions Great Plains as new ERP for multinational... Read More
Microsoft Great Plains is main Microsoft Business Solutions product, targeted... Read More
Rapid Application Development (RAD) is a software development methodology. In... Read More
You have gotten those E_Mails buy software at deep discounts.... Read More
Combining Microsoft Business Solutions Great Plains ERP with non-Microsoft Business... Read More
You've finally created databases that you can actually use to... Read More
When you need a phone number, you do a quick... Read More
Microsoft Great Plains could be tuned and setup to fit... Read More
Shareware has been fighting the stigma of being misunderstood for... Read More
When it comes to running an office, the SOHO entrepreneur... Read More
Microsoft CRM is winning market share step-by-step from such the... Read More
Many Webmasters have never bothered to view their website's server... Read More
Our hosted solution allow you to run your own search... Read More
insured cleaning company Highland Park ..GroupwareEfforts are continually made to manage the unavoidable ad hoc... Read More
The purpose of one of our projects was MS Exchange... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Do you remember that frustrating feeling when you find an... Read More
What is Software?Software is a set of instruction written to... Read More
We live in a post-industrial age where information is the... Read More
When you visit department stores and see that majority of... Read More
Navision Software was purchased by Microsoft and now it is... Read More
First we had the original Google search that evolved into... Read More
RSS (Really Simple Syndication) is a way for a site... Read More
Have you ever noticed that when you look at your... Read More
Software Engineering is the Systematic Approach for analysis design implementation... Read More
Microsoft Business Solutions Great Plains has substantial market share among... Read More
Microsoft Business Solutions CRM is present several years on the... Read More
IntroductionDuring the early years of our modern computer era, very... Read More
Small can be beautiful! Working with Knoppix for the past... Read More
With any good luck and a good amount of hard... Read More
Collaboration SoftwareCollaboration Software, also known as group collaboration software or... Read More
Microsoft Office program is a programming tool called Visual Basic... Read More
All of us know that Microsoft bought former Great Plains... Read More
Table of Contents1) Introduction 2) Related Work 3) Framework 4)... Read More
Disclaimer: All the thoughts expressed are my views only! Your... Read More
We'll give you non formal view, based on our consulting... Read More
Great Plains Purchase Order Processing (POP) module makes up one-third... Read More
You might think you don't need a firewall... Read More
Software |