.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.
maid service near Lake Forest ..Adware is a type of Spyware program that displays some... Read More
Software Engineering is the Systematic Approach for analysis design implementation... Read More
When you buy a computer, it most likely comes with... Read More
The term "document management" and "paperless office" is the subject... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software eEnterprise,... Read More
In the real world a "fire wall" is a fireproof... Read More
A few months back I really got sick of my... Read More
What is Software?Software is a set of instruction written to... Read More
While paper labeling CDs and DVDs may appear to be... Read More
I suggest that you do not spend a lot of... Read More
Configuring PPP PAP AuthenticationNow we know how the ISDN link... Read More
Imagine something that follows you home and sets itself up... Read More
Looking at all the ads which promise to get rid... Read More
An integral part of any quality CRM system is lead... Read More
Great Plains Accounting, accounting package for mid-size and small companies... Read More
Microsoft Great Plains may be recommended for international freight forwarding... Read More
Customer Relationship Management, abbreviated "CRM," is the term for a... Read More
It is now common thing when large corporation selects mid-market... Read More
When you need a phone number, you do a quick... Read More
eStore Advantage allows front-office applications to communicate with back-office business... Read More
Lotus Notes Domino is very efficient in electronic document workflow... Read More
When you first think about multicurrency ? you probably have... Read More
In our opinion, traditional approach when you select ERP/MRP system... Read More
Whether you are an experienced web programmer or a complete... Read More
As of now - Great Plains Dynamics/eEnterprise is transformed/renamed into... Read More
top rated cleaning service Des Plaines ..Crystal Reports is the most flexible tool on the market... Read More
Current Microsoft Business Solutions Great Plains has more that 10... Read More
Microsoft Business Solutions Great Plains fits to majority of horizontal... Read More
Customer Relationship Management or CRM is a combination of enterprise... Read More
Microsoft Great Plains and Microsoft Retail Management System (Microsoft RMS)... Read More
Adware is a type of Spyware program that displays some... Read More
If your company has regional and worldwide operations, you might... Read More
It???s easy to understand why you might be drawn to... Read More
Microsoft has never released a service pack for Windows98 SE,... Read More
Case study: A secretary using Corel WordPerfect 7 is often... Read More
You might think you don't need a firewall... Read More
Just the thought of a duel-boot scares many people away,... Read More
XML Server can be a Web Server that stores the... Read More
Considering whether or not your software company should hire a... Read More
Microsoft Business Solutions ? Great Plains is designed to meet... Read More
SOFTWARE PIRACY We regularly hear reports... Read More
Are you one of those people that keeps track of... Read More
With any good luck and a good amount of hard... Read More
A UNIX Shell is in simplest terms, a command line... Read More
Microsoft Retail Management System serves retail single store as well... Read More
Siebel is traditional CRM market leader, however and mostly due... Read More
If you copy something from a Web site or elsewhere...... Read More
Logistics automation is often considered as barcoding extension to Sales... Read More
Microsoft Great Plains is main accounting / ERP application... Read More
Introduction: The creating of a computer program involves a number... Read More
Software |