.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.
express cleaning service Arlington Heights ..Looks like Microsoft Great Plains becomes more and more popular,... Read More
The Windows registry is a huge database that ensures normal... Read More
The various resume software offered, particularly on the internet, can... Read More
Assertion facility is added in J2SE 1.4. In order to... Read More
Beginning with Domino version R4 it has integration with the... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
Microsoft Great Plains is main mid-market application from Microsoft Business... Read More
Microsoft Business Solutions Great Plains was historically designed to serve... Read More
Traditionally we were considering functionally rich systems, such as SAP,... Read More
In this short FAQ style article we would like to... Read More
Microsoft Business Solutions Great Plains is written in Great Plains... Read More
Introduction To ISDN, Part III: Configuring PPP PAP AuthenticationNow we... Read More
Icons are used everywhere; right from software applications, to internet... Read More
Microsoft Great Plains could be tuned and setup to fit... Read More
For those who still don't know, Microsoft Publisher helps computer... Read More
If you have Microsoft Great Plains and support it for... Read More
Before September 1995, Microsoft Windows was an MS-DOS program. DOS... Read More
Microsoft Business Solutions Great Plains serves to the wide spectrum... Read More
Microsoft CRM is winning market share step-by-step from such the... Read More
Running Applications in Compatibility Mode With Windows XP, you can... Read More
All of us know that Microsoft bought former Great Plains... Read More
Microsoft Business Solutions Great Plains was purchased from Great Plains... Read More
Language development computer: Computer-based method for aiding language development seems... Read More
Microsoft Business Solutions Great Plains, Solomon, Navision, Axapta, Microsoft CRM... Read More
Microsoft Business Solutions products: Great Plains, MS CRM, Navision, Axapta,... Read More
tidy up service Arlington Heights ..Remember nice and prosperous Clinton era? When you implemented innovative... Read More
Usually, the easiest way to tell you have spyware is... Read More
ERP Consulting industry is on the way to serve clients... Read More
GroupwareThe internet is full of 1.5 million to 7 million... Read More
We live in a post-industrial age where information is the... Read More
Ad-Aware and Spybot are probably the two most well known... Read More
This article illustrates the best practices to improve the performance... Read More
As you probably know, when Microsoft purchased Great Plains Software... Read More
Microsoft CRM was designed to be easily customizable. Microsoft CRM... Read More
IBM Lotus Domino or Microsoft Exchange?The severe competition continues for... Read More
There are plenty of articles out there about how to... Read More
Most computer users use spreadsheets software such as Microsoft Excel... Read More
How would you like to prevent spyware and adware from... Read More
Microsoft Great Plains is now targeting large and midsize businesses... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
Microsoft Business Solutions Great Plains is very popular ERP/MRP applications... Read More
Whether you are a small consultancy firm, a medium sized... Read More
We would like to give you pluses and minuses of... Read More
Microsoft Business Solutions Great Plains is written in Great Plains... Read More
The Windows registry is a huge database that ensures normal... Read More
In part III of this ISDN primer, we learned that... Read More
Simply put, fleet maintenance allows companies to monitor and maintain... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
I have recently created my first Php program. I wanted... Read More
Stop the Runaway MouseWhat's the "runaway mouse?" You've seen it...you... Read More
Software |