.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.
scheduled cleaning services Winnetka ..Homeland security, airport security, Internet security ??" these days we???re... Read More
I like my software simple. If it's too complex or... Read More
For those who are unclear on the differences between the... Read More
SOFTWARE PIRACY We regularly hear reports... Read More
If you feel intimidated when someone tries to teach you... Read More
Finally, you have some time to personalize your desktop with... Read More
Just the thought of a duel-boot scares many people away,... Read More
The objective for Zandi Digital is to make available clever... Read More
Microsoft Business Solutions Great Plains serves to the wide spectrum... Read More
Microsoft Business Solutions Great Plains has several options to enable... Read More
Sticky Noteshttp://www.deprice.com/stickynote.htmWith StickyNote 9.0, you can create beautiful 3D notes... Read More
In today's business world it's all but impossible to escape... Read More
Microsoft Great Plains has substantial mid-market share in the USA... Read More
Microsoft Business Solutions CRM is present several years on the... Read More
The purpose of one of our projects was MS Exchange... Read More
Finding the best spyware removers to detect and remove spyware... Read More
There are two major WYSIWYG(What You See Is What You... Read More
Anti-virus software is used to find, remove or fix files... Read More
How would you like to prevent spyware and adware from... Read More
So, you've bought a new Macintosh, and now you may... Read More
Microsoft Business Solutions CRM and IBM Lotus Notes Domino, being... Read More
Microsoft Business Solutions Great Plains is written in Great Plains... Read More
Great Plains Software Dynamics, Dynamics C/S+, eEnterprise were written on... Read More
Microsoft Business Solutions Great Plains is Dexterity-written application and currently... Read More
This article is the third of a series of articles... Read More
reliable maid service Lincolnshire ..MSN messenger is a pretty cool invention. I mean I'm... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics/eEnterprise... Read More
Microsoft Great Plains may be recommended for international freight forwarding... Read More
Java has come along a long way. Many would agree... Read More
Before September 1995, Microsoft Windows was an MS-DOS program. DOS... Read More
In our small article we'll consider Microsoft Business Solutions Great... Read More
Creating a new markup language.Introduction.General Reuse Markup Langauge, or GRML,... Read More
This short paper will expand on two key reasons to... Read More
A UNIX Shell is in simplest terms, a command line... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
You've finally created databases that you can actually use to... Read More
Microsoft Office program is a programming tool called Visual Basic... Read More
IntroductionSurprised, by the title? well, this is a tour of... Read More
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
I have yet to see a business that, sometimes in... Read More
Google Inc. has launched a new software package that allows... Read More
Case study: A secretary using Corel WordPerfect 7 is often... Read More
In order to meet regulatory and corporate compliance requirements reporting... Read More
Let us give you - developer some hints in the... Read More
Linux essentials:It's free for download but you have to pay... Read More
Microsoft Business Solutions Great Plains serves multiple industries in the... Read More
This article is the first of a series of articles... Read More
Manufacturing in the USA is far away down from mid... Read More
Microsoft Business Solutions CRM is present several years on the... Read More
It is really interesting that a bug can create problem... Read More
Software |