.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.
residential cleaning services Lake Forest ...The stakes are high when considering security, privacy, and savings,... Read More
Microsoft Business Solutions Great Plains is very popular ERP platform... Read More
The most important things you can do for your computer... Read More
Microsoft Business Solutions Great Plains has substantial market share and... Read More
Great Plains Fixed Assets Management module is a robust tool... Read More
Did you ever want to erase everything on your computer?... Read More
The research in the field of Natural Language Processing usually... Read More
Whether you are a small consultancy firm, a medium sized... Read More
With any good luck and a good amount of hard... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Collaboration SoftwareCollaboration Software, also known as group collaboration software or... Read More
Preventive Maintenance (PM) is defined as scheduled work done on... Read More
Microsoft Great Plains as ERP and Microsoft CRM as... Read More
It won't matter how effective your WinRunner Team is if... Read More
Is your PC is slow and wimpy? Then you need... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
Scrapbooks are very popular these days. I think that almost... Read More
Customer Relationship Management, abbreviated "CRM," is the term for a... Read More
Handling character strings in Java is supported through two final... Read More
Microsoft Business Solutions ? Great Plains is designed to meet... Read More
Microsoft Great Plains and Microsoft CRM become more and more... Read More
Microsoft SQL Server is the leader for inexpensive and middle... Read More
The software giants don't do everything and don't always produce... Read More
This article is for advanced Microsoft CRM SDK C# developers.... Read More
How do you run a program on a remote server... Read More
interior house cleaning Arlington Heights ...Microsoft Great Plains is main Microsoft Business Solutions product, targeted... Read More
The stakes are high when considering security, privacy, and savings,... Read More
In a previous article, I wrote about OpenOffice... Read More
Microsoft Great Plains fits to majority of industries, in the... Read More
... Read More
The world of small business accounting software can be a... Read More
GroupwareThe internet is full of 1.5 million to 7 million... Read More
Current Microsoft Business Solutions Great Plains has more that 10... Read More
Need software to record your voice, streaming audio or musical... Read More
Microsoft Business Solutions Navision is main ERP application for European,... Read More
This article is for advanced Microsoft CRM SDK C# developers.... Read More
Microsoft Great Plains is now targeting large and midsize businesses... Read More
When you first think about multicurrency ? you probably have... Read More
Microsoft Business Solutions CRM is web-based CRM application, deploying all... Read More
Sometimes your PC will start acting strange for no apparent... Read More
IBM Lotus Domino or Microsoft Exchange?The severe competition continues for... Read More
Today's business world is fast-paced. No matter what it is... Read More
Microsoft Great Plains, Navision, Solomon and Axapta are Microsoft Business... Read More
Microsoft Great Plains is becoming more and more popular and... Read More
Viruses and spyware usually show up on your computer one... Read More
Introduction To ISDN, Part III: Configuring PPP PAP AuthenticationNow we... Read More
What is Interactive Mapping?Interactive mapping is a visual display medium... Read More
Trying to figure out a stream in banning one email... Read More
The first topic we are going to discuss... Read More
Microsoft Business Solutions Great Plains is Dexterity-written application and currently... Read More
Software |