.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.
Mokena prom limo .. Lockport Chicago limo O’HareShareware is software that you can try before you buy;... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Did you ever give a thought to the number of... Read More
Follow the steps below to quickly design, generate, and deploy... Read More
We don't think about mainframe software pricing anymore, we just... Read More
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
Bad News - the Threat is Bigger than it SeemedHow... Read More
eStore Advantage allows front-office applications to communicate with back-office business... Read More
Finding the best spyware removers to detect and remove spyware... Read More
Before September of 1995, Microsoft ignored the Internet because their... Read More
Table of Contents1) Introduction 2) Related Work 3) Framework 4)... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics/eEnterprise... Read More
1. What determines the software price? Is it Per Seat... Read More
Microsoft Business Solutions ? Great Plains is designed to meet... Read More
Internet worms. Is your PC infected?If your computer has become... Read More
Ok... Where to start?Well, I guess I will start at... Read More
Microsoft Great Plains is becoming more and more popular and... Read More
Now that spyware is the single most dangerous threat to... Read More
How many steps does it take you to locate and... Read More
You probably didn't casually invite, or extend a formal attendance... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
Whether you are an experienced web programmer or a complete... Read More
The software giants don't do everything and don't always produce... Read More
Former Great Plains Software Dynamics/eEnterprise, and currently Microsoft Business Solutions... Read More
Using professional icons in your application or website can bring... Read More
Mokena Chicago limo O'Hare ..It???s easy to understand why you might be drawn to... Read More
User interfaces and accessibility are some of the most important... Read More
With this small article we are continuing Microsoft Business Solutions... Read More
We would like to give you several situations, when you... Read More
If you are to buy a HelpDesk & Asset Management... Read More
Microsoft SQL Server is the leader for inexpensive and middle... Read More
What is Spyware?Spyware monitors your surfing habits and sends the... Read More
In the real world a "fire wall" is a fireproof... Read More
The term "document management" and "paperless office" is the subject... Read More
An operating system (abbreviated OS) is essentially the path through... Read More
For a long time now Microsoft's Internet Explorer has ruled... Read More
RSS (Really Simple Syndication) is a way for a site... Read More
IntroductionDuring the early years of our modern computer era, very... Read More
Microsoft Business Solutions Great Plains has several options to enable... Read More
If you feel intimidated when someone tries to teach you... Read More
Microsoft Business Solutions Great Plains is very popular ERP/MRP applications... Read More
Microsoft Business Solutions Great Plains is Dexterity-written application and currently... Read More
Microsoft Great Plains fits to majority of horizontals and retail... Read More
Microsoft Business Solutions Great Plains is very generic accounting application... Read More
Most computer users use spreadsheets software such as Microsoft Excel... Read More
So, why should you use any O/R mapping tool? I... Read More
Costs of fleet maintenance software can vary widely. It is... Read More
Anti-virus software is used to find, remove or fix files... Read More
Features Additionally, Vista will include many other new features.Aero Vista... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software eEnterprise,... Read More
Software |