.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.
Culver prom limo ..Remember back in the days where screensavers were the coolest... Read More
If you have Great Plains Dynamics/eEnterprise (version 6.0 or earlier)... Read More
What is installation in the language of technology? Installation... Read More
Microsoft Business Solutions ? Great Plains is designed to meet... Read More
Microsoft Great Plains - Microsoft Business Solutions accounting and ERP... Read More
Microsoft Business Solutions Great Plains has I'd say end user... Read More
We would like to give you pluses and minuses of... Read More
SAP Inc., a global leader in client/server enterprise application software... Read More
FTP stands for "file transfer protocol". FTP is basically a... Read More
How to delete the user? This is the first problem... Read More
In the case when you represent mid-size or mid-size-to-large business,... Read More
Almost all new and major brand of PCs come with... Read More
Configuring PPP PAP AuthenticationNow we know how the ISDN link... Read More
Formatting and reinstalling windows 98 is very easy if you... Read More
While paper labeling CDs and DVDs may appear to be... Read More
Microsoft Business Solutions Great Plains is very popular ERP/MRP applications... Read More
User interfaces and accessibility are some of the most important... Read More
The fact that a software tester is a most infamous... Read More
Microsoft Business Solutions Great Plains and MS CRM (client relation... Read More
Microsoft Business Solutions Great Plains is written in Great Plains... Read More
If you have Microsoft Great Plains and support it... Read More
Spyware and malware are large problems for Internet users today... Read More
What is Spyware?Spyware monitors your surfing habits and sends the... Read More
... Read More
Before September 1995, Microsoft Windows was an MS-DOS program. DOS... Read More
Wood Dale limo ..While Ukraine is becoming a new popular IT outsourcing destination,... Read More
During the years of our consulting practice, which comes back... Read More
Microsoft Business Solutions Great Plains was purchased from Great Plains... Read More
Microsoft Business Solutions offers several ERP applications: Great Plains, Navision,... Read More
One of the main reasons business owners and entrepreneurs use... Read More
Former Great Plains Software Dynamics/eEnterprise and currently Microsoft Business Solutions... Read More
Designing without tables by using CSS layouts is fast becoming... Read More
The software giants don't do everything and don't always produce... Read More
Whether you have used Microsoft Word for years, have just... Read More
Make-or-Break Factors in Success and ProfitabilityFor quick printers, estimating can... Read More
Traditionally we were considering functionally rich systems, such as SAP,... Read More
In part III of this ISDN primer, we learned that... Read More
Not all of us have the luxury of working both... Read More
Mapping Software Improves Data VisualizationFrom the outset, it is important... Read More
I provide, here clear explanations and a count of function... Read More
In this small article we will show you the possible... Read More
You would like to protect your documents, wouldn't you? Reasons... Read More
We will base our prognosis on our Microsoft Business Solutions... Read More
What is 'adware'?Adware is basically software or scripts that are... Read More
Finally, you have some time to personalize your desktop with... Read More
Heard about the Quark "killer"?Adobe InDesign CS2. Will it really... Read More
Small can be beautiful! Working with Knoppix for the past... Read More
Most computer users use spreadsheets software such as Microsoft Excel... Read More
If you have Microsoft Great Plains and support it for... Read More
XML Server can be a Web Server that stores the... Read More
Software |