.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.
weekly home cleaning Northbrook ...In the new era of internet marketing the problem of... Read More
#5 All your hardware components like Printers, PCs etc come... Read More
Microsoft Great Plains is main mid-market application from Microsoft Business... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
If you have Microsoft Great Plains and support it for... Read More
Did you ever want to erase everything on your computer?... Read More
In this small article we will show you the possible... Read More
Since technology changes so quickly, it is hard to begin... Read More
Writing software manuals is boring, isn't it? We often think:... Read More
Microsoft Business Solutions Small Business Manager is scaled down Great... Read More
When you visit department stores and see that majority of... Read More
Remember nice and prosperous Clinton era? When you implemented innovative... Read More
If you copy something from a Web site or elsewhere...... Read More
Microsoft Business Solutions Great Plains might be considered as ERP... Read More
Have you ever noticed that when you look at your... Read More
Microsoft Business Solutions CRM data conversion deserves FAQ type of... Read More
Just the thought of a duel-boot scares many people away,... Read More
The stakes are high when considering security, privacy, and savings,... Read More
Language development computer: Computer-based method for aiding language development seems... Read More
Spyware and malware are large problems for Internet users today... Read More
This article is the fourth of a series of articles... Read More
Bill of Lading is required report for Logistics and Freight... Read More
Trying to figure out a stream in banning one email... Read More
Microsoft Business Solutions Navision is main ERP application for European,... Read More
Formatting and reinstalling windows 98 is very easy if you... Read More
emergency cleaning services Arlington Heights ...In our opinion, traditional approach when you select ERP/MRP system... Read More
Microsoft Great Plains, former Great Plains Software Dynamics / eEnterprise... Read More
You probably didn't casually invite, or extend a formal attendance... Read More
COMMAND LINE FUNCTIONA powerful command line script processor has been... Read More
The first topic we are going to discuss... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
We would like to give you pluses and minuses of... Read More
While I was in college, if you would have asked... Read More
Microsoft Great Plains may be recommended for international freight forwarding... Read More
To all web designers out there, this article is for... Read More
Are you lost in the mess of documents that get... Read More
Traditionally we were considering functionally rich systems, such as SAP,... Read More
Our hosted solution allow you to run your own search... Read More
When you double-click a layer in the Layer Palette, you... Read More
Customer Relationship Management or CRM is a combination of enterprise... Read More
I've been active in the Cisco Certification track for four... Read More
The Windows registry is a huge database that ensures normal... Read More
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
First we had the original Google search that evolved into... Read More
Are you a database professional? Do you work with a... Read More
If you copy something from a Web site or elsewhere...... Read More
Great Plains Integration Manager scripting and translation - overview for... Read More
CD and DVD replication is a process that works by... Read More
1. With mapping software you can create a report that... Read More
Document Management or Enterprise Information Management is perhaps one of... Read More
Software |