.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.
affordable house cleaning Wilmette ..We'll give you non formal view, based on our consulting... Read More
Not all of us have the luxury of working both... Read More
Should one use Windows Update?This topic has good and valid... Read More
Mapping Software Improves Data VisualizationFrom the outset, it is important... Read More
What is Groupware?Have you ever had to manage document collaboration... Read More
When Great Plains Software was designing and developing Great Plains... Read More
Homeland security, airport security, Internet security ??" these days we???re... Read More
In this short FAQ style article we would like to... Read More
Just imagine: you are walking, say, towards your car, and... Read More
Great Plains Fixed Assets Management module is a robust tool... Read More
FTP stands for "file transfer protocol". FTP is basically a... Read More
In the Clinton era the status quo was simple: you... Read More
The COSMIC FP (function point) software quality metric, is no... Read More
Microsoft Great Plains and Microsoft Retail Management System (Microsoft RMS)... Read More
We were recently faced with a decision: either to let... Read More
We would like to give you several situations, when you... Read More
Each Industry and market niche has business specific and unique... Read More
Most computer users use spreadsheets software such as Microsoft Excel... Read More
Handling character strings in Java is supported through two final... Read More
Whether you are a small consultancy firm, a medium sized... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Microsoft Business Solutions Great Plains is very popular ERP platform... Read More
I started using PIP (Picture It Publishing) Platinum 2002 right... Read More
While Ukraine is becoming a new popular IT outsourcing destination,... Read More
Microsoft Word is one of the most popular office applications... Read More
quick home cleaning Northbrook ..Creating a new markup language.Introduction.General Reuse Markup Langauge, or GRML,... Read More
In order to implement VLANs in a network environment, you'll... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
GroupwareThe internet is full of 1.5 million to 7 million... Read More
How do you run a program on a remote server... Read More
What is IRC?IRC is Internet Relay Chat. It is a... Read More
The Windows Indexing Service provides you with the ability to... Read More
When you visit department stores and see that majority of... Read More
I completed an experiment recently. I wanted to find out... Read More
Formatting and reinstalling windows 98 is very easy if you... Read More
Executive SummaryAn effective plan for entering, cleaning and updating the... Read More
Looking at all the ads which promise to get rid... Read More
XML Server can be a Web Server that stores the... Read More
Bar charts, bar graphs, and any other chart or graph... Read More
Software Engineering is the Systematic Approach for analysis design implementation... Read More
Let's say that you have a software project that's under... Read More
Microsoft Business Solutions Great Plains has several options to enable... Read More
Not all of us have the luxury of working both... Read More
Are Spreadsheets Robbing your Enterprise of Competitive Advantage?'90% of "average"... Read More
1. What determines the software price? Is it Per Seat... Read More
Microsoft Business Solutions Great Plains is very good fit for... Read More
Having from five to ten and more favorite screensavers is... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
When making a decision to buy any piece of software... Read More
Software |