.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 VBprofs.com - the newest Visual Basic and VB.NET resources portal.
In our small article we'll consider Microsoft Business Solutions Great... Read More
Finding the best spyware removers to detect and remove spyware... Read More
Microsoft Great Plains is one of three Microsoft Business Solutions... Read More
You have gotten those E_Mails buy software at deep discounts.... Read More
Microsoft Business Solutions Great Plains is mid and even corporate... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Microsoft Great Plains is now targeting large and midsize businesses... Read More
Customer Relationship Management (CRM) is a strategy and processes used... Read More
IBM Lotus Notes Domino and Microsoft CRM (Client Relation Management)... Read More
With so many Microsoft Windows related viruses, errors, and other... Read More
Costs of fleet maintenance software can vary widely. It is... Read More
Remember old good days when your company probably had Great... Read More
Microsoft Great Plains has full-featured Manufacturing suite of modules: Capacity... Read More
While I was preparing some personal background information for a... Read More
Microsoft PowerPoint has dramatically changed the way in which academic... Read More
Microsoft Business Solutions Great Plains might be considered as ERP... Read More
In this small article we will show you the possible... Read More
Microsoft CRM customization techniques are very diversified and based on... Read More
Anti-virus software is used to find, remove or fix files... Read More
Stealing company information used to be the specialty of spies... Read More
Need help making sense of algebra? Have algebra lectures in... Read More
If you have been running Windows XP for a couple... Read More
If you have Microsoft Great Plains and support it for... Read More
Spyware and Adware infest over 90 percent of computers in... Read More
COMMAND LINE FUNCTIONA powerful command line script processor has been... Read More
It is a well known fact that Java as a... Read More
In our case ? we serve Microsoft Business Solutions ERP... Read More
As we could imagine, if you are reading this article... Read More
Microsoft Great Plains has substantial mid-market share in the USA... Read More
Linux essentials:It's free for download but you have to pay... Read More
NOTE: Please take time to read on - it may... Read More
The intuitive algorithm.Roger Penrose considered it impossible. Thinking could never... Read More
Microsoft Business Solutions Navision is main ERP application for European,... Read More
Microsoft Business Solutions Great Plains might be considered as ERP... Read More
This short paper will expand on two key reasons to... Read More
This is a short article, written in question/answer/FAQ style to... Read More
Microsoft Business Solutions CRM proved to be reliable solution in... Read More
GroupwareThe internet is full of 1.5 million to 7 million... Read More
IBM Lotus Notes Domino and Microsoft CRM (Client Relation Management)... Read More
Well, even if the combination might look very unusual, we... Read More
Microsoft Great Plains and Microsoft Retail Management System (Microsoft RMS)... Read More
Healthcare facilities such as clinics, hospitals, and biomedical laboratories can... Read More
After seeing many people complain about their weak Internet security... Read More
Are Spreadsheets Robbing your Enterprise of Competitive Advantage?'90% of "average"... Read More
In 2004 Oracle, Inc. made its new step toward J2EE... Read More
A wiki is an editable text-based website. But you don't... Read More
It could just be me, but my experiences with document... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
For a long time now Microsoft's Internet Explorer has ruled... Read More
Although we don't know whether Microsoft ever envisioned such a... Read More
Now is the time to look at an alternative to... Read More
Itâ??s easy to understand why you might be drawn to... Read More
Hi, Guys,I believe a lot of programmers are trying to... Read More
Usually workflow & messaging is realized in CRM and then... Read More
Software development is a risky business.Many software developers are barely... Read More
Microsoft Great Plains fits to majority of horizontals and retail... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics/eEnterprise... Read More
Just the thought of a duel-boot scares many people away,... Read More
The first topic we are going to discuss... Read More
Configuring PPP PAP AuthenticationNow we know how the ISDN link... Read More
Currently Microsoft Business Solutions is on the way of creating... Read More
Microsoft Great Plains as ERP and Microsoft CRM as... Read More
It is now common thing when large corporation selects mid-market... Read More
Heard about the Quark "killer"?Adobe InDesign CS2. Will it really... Read More
ERP Consulting industry is on the way to serve clients... Read More
IBM Lotus Domino or Microsoft Exchange?The severe competition continues for... Read More
Software |