.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.
maide service in Lincolnshire ..Every day millions of new web documents emerge on the... Read More
Ad-Aware and Spybot are probably the two most well known... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Great Plains Fixed Assets Management module is a robust tool... Read More
Since Version 8.0 Microsoft Business Solutions Great Plains & Great... Read More
The Windows Indexing Service provides you with the ability to... Read More
Traditionally we were considering functionally rich systems, such as SAP,... Read More
Around the same time Microsoft made its move with .Net... Read More
When you visit department stores and see that majority of... Read More
If you've been using MySQL database to store your important... Read More
Rapid Application Development (RAD) is a software development methodology. In... Read More
Microsoft Business Solutions is emerging as very attractive vendor for... Read More
I have always had a tendency to focus on the... Read More
The intentions of this short tutorial are not to teach... Read More
Beginning with Domino version R4 it has integration with the... Read More
With any good luck and a good amount of hard... Read More
Scrapbooks are very popular these days. I think that almost... Read More
Great Plains Accounting, accounting package for mid-size and small companies... Read More
Great Plains Purchase Order Processing (POP) module makes up one-third... Read More
IBM Lotus Notes with Domino email server is traditional document... Read More
How to delete the user? This is the first problem... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
This short paper will expand on two key reasons to... Read More
Since its release in 1987, QuarkXpress had made an immediate... Read More
This article is for advanced Microsoft CRM SDK C# developers.... Read More
cleaning lady near Deerfield ..Not all of us have the luxury of working both... Read More
Microsoft Business Solutions Great Plains is very good fit for... Read More
Intro This concise article will tell you in plain English... Read More
This article is the third of a series of articles... Read More
ERP (Enterprise Resource Planning) Overview covers What is ERP, Brief... Read More
Imagine something that follows you home and sets itself up... Read More
Adobe Photoshop is one of the world's leading graphics editing... Read More
Spyware and Adware infest over 90 percent of computers in... Read More
Software development is a risky business.Many software developers are barely... Read More
Here is some free software tools to help you build... Read More
It is a well known fact that Java as a... Read More
It could just be me, but my experiences with document... Read More
Currently Microsoft Business Solutions is on the way of creating... Read More
Bad News - the Threat is Bigger than it SeemedHow... Read More
It won't matter how effective your WinRunner Team is if... Read More
SyncUp, a file synchronizer is designed to assist the home... Read More
Microsoft Great Plains is becoming more and more popular and... Read More
What is RAID RECOVERY?RAID stands for Redundant Array of Inexpensive... Read More
Combining Microsoft Business Solutions Great Plains ERP with non-Microsoft Business... Read More
MS CRM is very close to document workflow automation, including... Read More
Ok... Where to start?Well, I guess I will start at... Read More
Program Flow is what you think it is. How the... Read More
We would like to give you pluses and minuses of... Read More
Software Engineering is the Systematic Approach for analysis design implementation... Read More
Accounts payable is just one area of office management where... Read More
Software |