.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.
Mercedes Benz s500 rentals Salem ..Which Type of Shop Can Rely On A Home Built... Read More
When you double-click a layer in the Layer Palette, you... Read More
Microsoft Word is one of the most popular office applications... Read More
This article is for advanced Microsoft CRM SDK C# developers.... Read More
The objective for Zandi Digital is to make available clever... Read More
When you need a phone number, you do a quick... Read More
Pirated software is on the increase and now accounts for... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software eEnterprise,... Read More
It could just be me, but my experiences with document... Read More
Here is some free software tools to help you build... Read More
The title of "software engineer" has got to be among... Read More
Spyware, what it is and what it does. Basically, spyware... Read More
If you are in the market for new staffing software,... Read More
... Read More
Around the same time Microsoft made its move with .Net... Read More
Currently Microsoft Business Solutions is on the way of creating... Read More
How to delete the user? This is the first problem... Read More
When making a decision to buy any piece of software... Read More
A LOT OF UNWANTED FILES.When you uninstall an item of... Read More
Microsoft Business Solutions Great Plains, Navision, Axapta, Solomon and CRM... Read More
Sales are all about leverage, because there is only so... Read More
Handling character strings in Java is supported through two final... Read More
If you have Great Plains Dynamics/eEnterprise (version 6.0 or earlier)... Read More
If you have Microsoft Great Plains and support it... Read More
Microsoft Great Plains, former Great Plains Software Dynamics, eEnterprise has... Read More
Dowagiac cheap limo service ..There are two approaches for application integration:? Programmer's approach ?... Read More
This short paper will expand on two key reasons to... Read More
Let's first look at your ERP system selection (without Retail... Read More
Microsoft Word is one of the most popular office applications... Read More
We were recently faced with a decision: either to let... Read More
Upgrading. Downtime. Maintenance. Hardware obsolescence. Implementation issues. The litany of... Read More
As you probably know, when Microsoft purchased Great Plains Software... Read More
Microsoft Great Plains and Microsoft CRM become more and more... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
This is a short article, written in question/answer/FAQ style to... Read More
As of now - Great Plains Dynamics/eEnterprise is transformed/renamed into... Read More
Siebel is traditional CRM market leader, however and mostly due... Read More
Before being able to choose a secure Internet communication system,... Read More
Around the same time Microsoft made its move with .Net... Read More
(1) Avoid using the same variable again and again for... Read More
Microsoft Great Plains is one of three Microsoft Business Solutions... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
Microsoft Great Plains fits to majority of horizontals and retail... Read More
If you have been using the Internet for any amount... Read More
Microsoft Great Plains fits to majority of industries, in the... Read More
Internet worms. Is your PC infected?If your computer has become... Read More
Microsoft Business Solutions CRM is now approaching the phase of... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
Microsoft Great Plains is becoming more and more popular and... Read More
IntroductionPHP can be used for a lot of different things,... Read More
Software |