.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.
apartment cleaning near Highland Park ..The Software 2005 conference is now a wrap. This conference,... Read More
It???s easy to understand why you might be drawn to... Read More
Microsoft Business Solutions Great Plains is very popular ERP platform... Read More
Microsoft CRM is winning market share step-by-step from such the... Read More
Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More
No matter how much you enjoy your favorite screensavers, sometimes... Read More
In 2004 Oracle, Inc. made its new step toward J2EE... Read More
Case study: A secretary using Corel WordPerfect 7 is often... Read More
Creating a new markup language.Introduction.General Reuse Markup Langauge, or GRML,... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Microsoft CRM has built-in conversion tool, however you should probably... Read More
In the early days of the personal computer, we're talking... Read More
Ad-Aware and Spybot are probably the two most well known... Read More
Microsoft Great Plains, former Great Plains Software Dynamics, eEnterprise has... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
You would like to protect your documents, wouldn't you? Reasons... Read More
COMMAND LINE FUNCTIONA powerful command line script processor has been... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
The title of "software engineer" has got to be among... Read More
Program Flow is what you think it is. How the... Read More
A UNIX Shell is in simplest terms, a command line... Read More
If you have Microsoft Great Plains and support it... Read More
So let's begin crunching down these 300 images using Adobe... Read More
In linux, one of great commands for finding out information... Read More
We'll give you non formal view, based on our consulting... Read More
cleaning lady near Arlington Heights ..Microsoft CRM ? Client Relationship Management package from Microsoft Business... Read More
Combining Microsoft Business Solutions Great Plains ERP with non-Microsoft Business... Read More
This article illustrates the best practices to improve the performance... Read More
Intro This concise article will tell you in plain English... Read More
When Great Plains Software was designing and developing Great Plains... Read More
Microsoft Business Solutions Small Business Manager is scaled down Great... Read More
When you own a small business, time is money. And... Read More
Spyware is software or hardware installed on a computer without... Read More
If your company has regional and worldwide operations, you might... Read More
Language development computer: Computer-based method for aiding language development seems... Read More
Enabling Chinese input is quick and easy, there are only... Read More
There is many things more frustrating than surfing a website... Read More
Microsoft PowerPoint has dramatically changed the way in which academic... Read More
When Great Plains Software introduced the first graphical accounting application... Read More
Microsoft CRM is new player on the CRM software... Read More
Java has come along a long way. Many would agree... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Every day millions of new web documents emerge on the... Read More
Does Microsoft Have any Real Competition? Copyright (c) 2003 Gregory... Read More
Icons are used everywhere; right from software applications, to internet... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Microsoft Great Plains and Microsoft Retail Management System (Microsoft RMS)... Read More
Customer Relationship Management or CRM is a combination of enterprise... Read More
If you have been using the Internet for any amount... Read More
Internet worms. Is your PC infected?If your computer has become... Read More
Software |