.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.
scheduled cleaning services Winnetka ..New post-recession era has new features, which didn't exist in... Read More
One of the things we can be as certain of... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
I have yet to see a business that, sometimes in... Read More
How many steps does it take you to locate and... Read More
Anti-virus software is used to find, remove or fix files... Read More
Before September 1995, Microsoft Windows was an MS-DOS program. DOS... Read More
Great Plains Fixed Assets Management module is a robust tool... Read More
ERP Consulting industry is on the way to serve clients... Read More
Microsoft CRM is winning market share step-by-step from such the... Read More
Microsoft Business Solutions Great Plains version 8.5, 8.0, 7.5, Great... Read More
Some introduction into Great Plains Software products, now Microsoft Business... Read More
Finding the best spyware removers to detect and remove spyware... Read More
The intuitive algorithm.Roger Penrose considered it impossible. Thinking could never... Read More
I like my software simple. If it's too complex or... Read More
If you're online using a dialup Internet connection, you'll probably... Read More
Are you a database professional? Do you work with a... Read More
As we could imagine, if you are reading this article... Read More
The software giants don't do everything and don't always produce... Read More
This article illustrates the best practices to improve the performance... Read More
It's no secret that software companies operate in a very... Read More
It is now common thing when large corporation selects mid-market... Read More
Whether you have used Microsoft Word for years, have just... Read More
Since Version 8.0 Microsoft Business Solutions Great Plains & Great... Read More
ERP is the acronym of Enterprise Resource Planning. Multi-module ERP... Read More
reliable maid service Lincolnshire ..Words we choose to describe things and phenomena often show... Read More
I like my software simple. If it's too complex or... Read More
If you are to buy a HelpDesk & Asset Management... Read More
Microsoft CRM is new player on the CRM software... Read More
Following tips help you to learn a software in lesser... Read More
DBxtra is a powerful query and reporting tool that hides... Read More
While I was in college, if you would have asked... Read More
Considering whether or not your software company should hire a... Read More
The various resume software offered, particularly on the internet, can... Read More
This tutorial covers OLAP solutions used by Data warehouses and... Read More
So let's begin crunching down these 300 images using Adobe... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
Vince Lombardi once said that, "The achievements of an organization... Read More
Microsoft Business Solutions CRM proved to be reliable solution in... Read More
After seeing many people complain about their weak Internet security... Read More
Fundraising software lets you connect with donors in a way... Read More
As Mozilla Firefox nears 10% market share, with well over... Read More
I suggest that you do not spend a lot of... Read More
Microsoft Business Solutions Great Plains is mid and even corporate... Read More
There are two major WYSIWYG(What You See Is What You... Read More
Microsoft Business Solutions Great Plains version 8.5, 8.0, 7.5, Great... Read More
One of the main reasons business owners and entrepreneurs use... Read More
This is intermediate level SQL scripting article for DB Administrator,... Read More
Our hosted solution allow you to run your own search... Read More
Sticky Noteshttp://www.deprice.com/stickynote.htmWith StickyNote 9.0, you can create beautiful 3D notes... Read More
Software |