.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.
cleaning team near Winnetka ..Accounts payable is just one area of office management where... Read More
What is a Web Database?A web database is a database... Read More
COMMAND LINE FUNCTIONA powerful command line script processor has been... Read More
For a long time now Microsoft's Internet Explorer has ruled... Read More
Find out why Spyware Removal from computers is important and... Read More
Mike Dunville* had a decision to make. As the new... Read More
Case study: A secretary using Corel WordPerfect 7 is often... Read More
Hi, Guys,I believe a lot of programmers are trying to... Read More
Think of this, first we had the HAM Radio, then... Read More
During the years of our consulting practice, which comes back... Read More
Microsoft Business Solutions Great Plains is very popular ERP platform... Read More
Microsoft Client Relation Management system (Microsoft CRM) and Microsoft RMS... Read More
2005 ? Back to the Future.What does the future hold?... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
In order to implement VLANs in a network environment, you'll... Read More
Background: For many organizations like ours, the interim target of... Read More
If you have Microsoft Great Plains and support it... Read More
Since technology changes so quickly, it is hard to begin... Read More
In 2004 Oracle, Inc. made its new step toward J2EE... Read More
Logistics automation is often considered as barcoding extension to Sales... Read More
Microsoft Business Solutions Great Plains and MS CRM (client relation... Read More
Fleet Maintenance Management is a critical position in any company... Read More
The first topic we are going to discuss... Read More
Microsoft-Outlook is a pretty amazing program. So much more than... Read More
Microsoft Great Plains has full-featured Manufacturing suite of modules: Capacity... Read More
family-safe home cleaners Northbrook ..Each Industry and market niche has business specific and unique... Read More
Software Engineering is the Systematic Approach for analysis design implementation... Read More
Former Great Plains Software Dynamics/eEnterprise, and currently Microsoft Business Solutions... Read More
To all web designers out there, this article is for... Read More
In the Clinton era the status quo was simple: you... Read More
The adware and spyware definitions list is very long. But... Read More
An operating system (abbreviated OS) is essentially the path through... Read More
IBM Lotus Notes with Domino email server is traditional document... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
Programming Help for BeginnersWe write programs to instruct computers. When... Read More
Many Webmasters have never bothered to view their website's server... Read More
In our case ? we serve Microsoft Business Solutions ERP... Read More
You have gotten those E_Mails buy software at deep discounts.... Read More
A few months back I really got sick of my... Read More
We would like first emphasize the change in the paradigm.... Read More
According to a survey conducted by InfoTrends/CAP Ventures entitled "Content-Centric... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
When you buy a computer, it most likely comes with... Read More
Passwords protect your most sensitive personal, financial and business information.... Read More
Background: For many organizations like ours, the interim target of... Read More
In our small article we'll consider Microsoft Business Solutions Great... Read More
Are you lost in the mess of documents that get... Read More
As seeing large number of implementations ? in our case... Read More
ERP is the acronym of Enterprise Resource Planning. Multi-module ERP... Read More
Usually, the easiest way to tell you have spyware is... Read More
Software |