.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.
tidy up service Glenview ..At the end of XX century, in the late 1990th... Read More
Mapping Software Improves Data VisualizationFrom the outset, it is important... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
The Microsoft system preparation utility for Windows 2000 is a... Read More
Manufacturing in the USA is far away down from mid... Read More
Document Manager and Version HistoryIn previous articles I have discussed... Read More
In 2004 Oracle, Inc. made its new step toward J2EE... Read More
The various resume software offered, particularly on the internet, can... Read More
Does Microsoft Have any Real Competition? Copyright (c) 2003 Gregory... Read More
When it comes to screenplay software each screenwriter needs to... Read More
Stop the Runaway MouseWhat's the "runaway mouse?" You've seen it...you... Read More
Microsoft Great Plains is main accounting / ERP application... Read More
There is many things more frustrating than surfing a website... Read More
If you look back to the history, you will see... Read More
I provide, here clear explanations and a count of function... Read More
Do you want to get quality software at a reasonable... Read More
The Windows registry is a huge database that ensures normal... Read More
We would like to give you pluses and minuses of... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
1. With mapping software you can create a report that... Read More
Microsoft Great Plains is one of three Microsoft Business Solutions... Read More
Microsoft Great Plains is main Microsoft Business Solutions product, targeted... Read More
Microsoft Business Solutions Great Plains is written in Great Plains... Read More
This is intermediate level SQL scripting article for DB Administrator,... Read More
Which Type of Shop Can Rely On A Home Built... Read More
full-service cleaning Mundelein ..User interfaces and accessibility are some of the most important... Read More
In our case ? we serve Microsoft Business Solutions ERP... Read More
Research bears that less than 70 percent of development projects... Read More
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
Microsoft Great Plains has full-featured Manufacturing suite of modules: Capacity... Read More
If you are software developer or database administrator - we... Read More
Well, even if the combination might look very unusual, we... Read More
This is intermediate level SQL scripting article for DB Administrator,... Read More
People often ask me: What image file formats will Photoshop... Read More
Scrapbooks are very popular these days. I think that almost... Read More
With this small article we are continuing Microsoft Business Solutions... Read More
We live in a post-industrial age where information is the... Read More
How to delete the user? This is the first problem... Read More
Current Microsoft Business Solutions Great Plains has more that 10... Read More
Spyware and Adware infest over 90 percent of computers in... Read More
We would like to give you pluses and minuses of... Read More
If there still are few unprotected computers left, I haven't... Read More
I completed an experiment recently. I wanted to find out... Read More
When reading an article where some term is used often,... Read More
Microsoft Business Solutions Navision is main ERP application for European,... Read More
.Net Framework is a platform or development environment to seamlessly... Read More
Using professional icons in your application or website can bring... Read More
Although statistics often is blamed for various deadly sins --... Read More
Now that spyware is the single most dangerous threat to... Read More
An operating system (abbreviated OS) is essentially the path through... Read More
Software |