.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.
house refresh service Lincolnshire ..Microsoft Business Solutions CRM proved to be reliable solution in... Read More
Creating a new markup language.Introduction.General Reuse Markup Langauge, or GRML,... Read More
Introduction To ISDN, Part III: Configuring PPP PAP AuthenticationNow we... Read More
Microsoft Great Plains, designed back in 1990th as database transferable... Read More
We all already got used to computer monitoring both at... Read More
A wiki is an editable text-based website. But you don't... Read More
Microsoft Business Solutions CRM is present several years on the... Read More
Fleet Maintenance Management is a critical position in any company... Read More
Most computer users use spreadsheets software such as Microsoft Excel... Read More
The fact that a software tester is a most infamous... Read More
#5 All your hardware components like Printers, PCs etc come... Read More
Which Type of Shop Can Rely On A Home Built... Read More
ERP Consulting industry is on the way to serve clients... Read More
When Great Plains Software was designing and developing Great Plains... Read More
Internet worms. Is your PC infected?If your computer has become... Read More
Microsoft CRM was designed to be easily customizable. Microsoft CRM... Read More
A few months back I really got sick of my... Read More
In 2004 Oracle, Inc. made its new step toward J2EE... Read More
Microsoft CRM is relatively new player on the now becoming... Read More
Research bears that less than 70 percent of development projects... Read More
While I was preparing some personal background information for a... Read More
We'll give you non formal view, based on our consulting... Read More
For those who are unclear on the differences between the... Read More
I started using PIP (Picture It Publishing) Platinum 2002 right... Read More
Task Manager is a Windows system utility that displays thetasks... Read More
licensed cleaning services Lake Forest ..Are you ready? SQL Server 2005, the next-generation data management... Read More
Whether you have used Microsoft Word for years, have just... Read More
Microsoft Business Solutions CRM is present several years on the... Read More
Software development is a risky business.Many software developers are barely... Read More
When you double-click a layer in the Layer Palette, you... Read More
Microsoft Business Solutions is emerging as very attractive vendor for... Read More
Usually, the easiest way to tell you have spyware is... Read More
Microsoft Business Solutions ? Navision is an integrated solution for... Read More
2005 ? Back to the Future.What does the future hold?... Read More
Microsoft Great Plains, Navision, Solomon and Axapta are Microsoft Business... Read More
Your computer cost you from hundreds to thousands of dollars,... Read More
Hey Guys! Don't raise your eyebrows or fear by hearing... Read More
Once a business idea is selected, it is highly recommended... Read More
Many Webmasters have never bothered to view their website's server... Read More
This tutorial covers OLAP solutions used by Data warehouses and... Read More
According to a survey conducted by InfoTrends/CAP Ventures entitled "Content-Centric... Read More
When reading an article where some term is used often,... Read More
Microsoft Business Solutions Great Plains and MS CRM (client relation... Read More
Microsoft Office program is a programming tool called Visual Basic... Read More
With thousands of web pages added to the Net every... Read More
Fleet Maintenance Management is a critical position in any company... Read More
We would like to give you several situations, when you... Read More
Document Manager and Version HistoryIn previous articles I have discussed... Read More
We've all seen the ads on TV for Netzero 3G.... Read More
Microsoft Business Solutions Great Plains as new ERP for multinational... Read More
Software |