.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.
disinfecting cleaning services Winnetka ..In the previous ISDN article, we looked at how and... Read More
Combining Microsoft Business Solutions Great Plains ERP with non-Microsoft Business... Read More
If you are software developer or database administrator - we... Read More
ERP is the acronym of Enterprise Resource Planning. Multi-module ERP... Read More
As of now - Great Plains Dynamics/eEnterprise is transformed/renamed into... Read More
There is many things more frustrating than surfing a website... Read More
Great Plains Fixed Assets Management module is a robust tool... Read More
Microsoft Great Plains may be recommended for international freight forwarding... Read More
We live in a post-industrial age where information is the... Read More
Microsoft Great Plains, former Great Plains Software Dynamics, eEnterprise has... Read More
We would like to give you pluses and minuses of... Read More
When Great Plains Software was designing and developing Great Plains... Read More
Microsoft Business Solutions Great Plains serves to the wide spectrum... Read More
Executive SummaryAn effective plan for entering, cleaning and updating the... Read More
Microsoft CRM is CRM answer from Microsoft and attempt to... Read More
Stealing company information used to be the specialty of spies... Read More
While I was preparing some personal background information for a... Read More
We all already got used to computer monitoring both at... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
While Ukraine is becoming a new popular IT outsourcing destination,... Read More
In the new era of internet marketing the problem of... Read More
We were recently faced with a decision: either to let... Read More
Our company, Novaprof Inc., developed unique software - DB Integration.... Read More
We've all seen the ads on TV for Netzero 3G.... Read More
While Adobe is the most known maker of PDF tools,... Read More
last minute cleaning help Highland Park ..I love new technology. I am still ready to wait... Read More
.NET platform does not support multiple inheritance. Do not confuse... Read More
When you need a phone number, you do a quick... Read More
Microsoft Business Solutions CRM is present several years on the... Read More
The cornerstone of successful automated office systems is the ability... Read More
IntroductionPHP can be used for a lot of different things,... Read More
If you company is small or mid-size special products or... Read More
Microsoft Great Plains as ERP and Microsoft CRM as... Read More
Microsoft Business Solutions Great Plains might be considered as ERP... Read More
Preventive Maintenance (PM) is defined as scheduled work done on... Read More
Using professional icons in your application or website can bring... Read More
Logistics automation is often considered as barcoding extension to Sales... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
Which Type of Shop Can Rely On A Home Built... Read More
The fact that a software tester is a most infamous... Read More
In our case ? we serve Microsoft Business Solutions ERP... Read More
Microsoft CRM is winning market share step-by-step from such the... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
Have you ever noticed that when you look at your... Read More
Since its release in 1987, QuarkXpress had made an immediate... Read More
As of now - Great Plains Dynamics/eEnterprise is transformed/renamed into... Read More
So, you've bought a new Macintosh, and now you may... Read More
Spyware, what it is and what it does. Basically, spyware... Read More
In this short FAQ style article we would like to... Read More
Let's say that you have a software project that's under... Read More
Software |