.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.
green cleaning service Glencoe ..This tutorial covers OLAP solutions used by Data warehouses and... Read More
DBxtra is a powerful query and reporting tool that hides... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
This article will not attempt to advocate the use of... Read More
This article is for advanced Microsoft CRM SDK C# developers.... Read More
Is Photoshop CS2 worth the upgrade? You bet it is!... Read More
Microsoft Business Solutions ? Great Plains is designed to meet... Read More
How to delete the user? This is the first problem... Read More
Former Great Plains Software Dynamics/eEnterprise, and currently Microsoft Business Solutions... Read More
IntroductionSurprised, by the title? well, this is a tour of... Read More
Most people don't use Photoshop to its fullest capabilities. Here... Read More
Introduction To ISDN, Part III: Configuring PPP PAP AuthenticationNow we... Read More
Case study: A secretary using Corel WordPerfect 7 is often... Read More
Microsoft Business Solutions Small Business Manager is Great Plains Dexterity... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics/eEnterprise... Read More
2005 ? Back to the Future.What does the future hold?... Read More
DBxtra goes ASPGetting to the information hidden within corporate databases... Read More
Siebel is traditional CRM market leader, however and mostly due... Read More
IntroductionDuring the early years of our modern computer era, very... Read More
IBM Lotus Domino or Microsoft Exchange?The severe competition continues for... Read More
.NET platform does not support multiple inheritance. Do not confuse... Read More
When my daughter was getting into AOL instant messaging (AIM)... Read More
Around the same time Microsoft made its move with .Net... Read More
Heard about the Quark "killer"?Adobe InDesign CS2. Will it really... Read More
house cleaning company Bannockburn ..Does Microsoft Have any Real Competition? Copyright (c) 2003 Gregory... Read More
No matter how much you enjoy your favorite screensavers, sometimes... Read More
There is many things more frustrating than surfing a website... Read More
Document Manager and Version HistoryIn previous articles I have discussed... Read More
If you look back to the history, you will see... Read More
Microsoft CRM is relatively new player on the now becoming... Read More
IBM Lotus Domino or Microsoft Exchange?The severe competition continues for... Read More
Since technology changes so quickly, it is hard to begin... Read More
Several software companies design programs for preventive maintenance. Most of... Read More
Microsoft Business Solutions Great Plains, Solomon, Navision, Axapta, Microsoft CRM... Read More
This article illustrates the best practices to improve the performance... Read More
Accounts payable is just one area of office management where... Read More
Stop the Runaway MouseWhat's the "runaway mouse?" You've seen it...you... Read More
Microsoft CRM customization techniques are very diversified and based on... Read More
Microsoft Business Solutions Great Plains is Dexterity-written application and currently... Read More
Traditionally we were considering functionally rich systems, such as SAP,... Read More
Now is the time to look at an alternative to... Read More
Anti-virus software is used to find, remove or fix files... Read More
Looks like Microsoft Great Plains becomes more and more... Read More
With the advent of 'Service Pack 2' for Windows XP... Read More
Microsoft Business Solutions Navision is main ERP application for European,... Read More
Customer Relationship Management, abbreviated "CRM," is the term for a... Read More
Microsoft Business Solutions is now in process of creating so... Read More
I love new technology. I am still ready to wait... Read More
Before being able to choose a secure Internet communication system,... Read More
Software |