.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.
custom home cleaning Wilmette ..Each Industry and market niche has business specific and unique... Read More
Microsoft Outlook is one of the most widely used software... Read More
Sometimes your PC will start acting strange for no apparent... Read More
This article will not attempt to advocate the use of... Read More
A LOT OF UNWANTED FILES.When you uninstall an item of... Read More
Now is the time to look at an alternative to... Read More
While Ukraine is becoming a new popular IT outsourcing destination,... Read More
Spyware and Adware infest over 90 percent of computers in... Read More
IntroductionPHP can be used for a lot of different things,... Read More
XML parser is a software module to read documents and... Read More
Formatting and reinstalling windows 98 is very easy if you... Read More
Current Microsoft Business Solutions Great Plains has more that 10... Read More
It???s easy to understand why you might be drawn to... Read More
Program Flow is what you think it is. How the... Read More
I suggest that you do not spend a lot of... Read More
The cornerstone of successful automated office systems is the ability... Read More
Microsoft CRM is now on the scene and it is... Read More
Microsoft Great Plains is one of three Microsoft Business Solutions... Read More
Crystal Reports is the most flexible tool on the market... Read More
Some introduction into Great Plains Software products, now Microsoft Business... Read More
When you visit department stores and see that majority of... Read More
People often ask me: What image file formats will Photoshop... Read More
OEComplete is a utility for managing the personal information of... Read More
Homeland security, airport security, Internet security ??" these days we???re... Read More
Which Type of Shop Can Rely On A Home Built... Read More
same day cleaning service Morton Grove ..The objective for Zandi Digital is to make available clever... Read More
Microsoft Business Solutions Great Plains might be considered as ERP... Read More
It is really interesting that a bug can create problem... Read More
Assertion facility is added in J2SE 1.4. In order to... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
Microsoft CRM is CRM answer from Microsoft Business Solutions.The whole... Read More
Google Inc. has launched a new software package that allows... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
First we had the original Google search that evolved into... Read More
Microsoft Great Plains as ERP and Microsoft CRM as... Read More
1. What determines the software price? Is it Per Seat... Read More
Software Engineering is the Systematic Approach for analysis design implementation... Read More
It's not very often I get excited about a software... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
User interfaces and accessibility are some of the most important... Read More
MSN messenger is a pretty cool invention. I mean I'm... 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
When you own a small business, time is money. And... Read More
Microsoft Great Plains, former Great Plains Software Dynamics, eEnterprise has... Read More
In the case when you represent mid-size or mid-size-to-large business,... Read More
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
Microsoft Outlook is one of the most widely used software... Read More
Microsoft CRM is new player on the CRM software... Read More
While paper labeling CDs and DVDs may appear to be... Read More
Software |