.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.
tidy up service Northbrook ..Software development is a risky business.Many software developers are barely... Read More
Many reasons made GBM a unanimous choice for experts, one... Read More
You would like to protect your documents, wouldn't you? Reasons... Read More
There are two approaches for application integration:? Programmer's approach ?... Read More
Once a business idea is selected, it is highly recommended... Read More
I like my software simple. If it's too complex or... Read More
Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Google Inc. has launched a new software package that allows... Read More
While several preventive maintenance software manufacturers offer free trials for... Read More
The purpose of one of our projects was MS Exchange... Read More
We will base our prognosis on our Microsoft Business Solutions... Read More
Bad News - the Threat is Bigger than it SeemedHow... Read More
Microsoft Great Plains, designed back in 1990th as database transferable... Read More
This article is the fourth of a series of articles... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
I have yet to see a business that, sometimes in... Read More
Whether you need to close a sale, gather end-user feedback,... Read More
Anyone who has ever used Microsoft Word knows that it... Read More
Microsoft Business Solutions Great Plains serves multiple industries in the... Read More
What is 'adware'?Adware is basically software or scripts that are... Read More
User interfaces and accessibility are some of the most important... Read More
Midsize business or non-profit organization should decide if one-vendor solution... Read More
For a long time now Microsoft's Internet Explorer has ruled... Read More
Navision Software was purchased by Microsoft and now it is... Read More
reliable home cleaners Buffalo Grove ..Manufacturing in the USA is far away down from mid... Read More
The cornerstone of successful automated office systems is the ability... Read More
Most people don't use Photoshop to its fullest capabilities. Here... Read More
eStore Advantage allows front-office applications to communicate with back-office business... Read More
What is Interactive Mapping?Interactive mapping is a visual display medium... Read More
Microsoft Great Plains could be tuned and setup to fit... Read More
Microsoft CRM is now on the scene and it is... Read More
In today's business world it's all but impossible to escape... Read More
C/SIDE (Client/Server Integrated Development Environment) - The core of... Read More
Passwords protect your most sensitive personal, financial and business information.... Read More
If you are software developer or database administrator - we... Read More
Microsoft Great Plains might be considered as ERP platform to... Read More
Document Management or Enterprise Information Management is perhaps one of... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Best Software Act! is very popular CRM for small and... Read More
Sticky Noteshttp://www.deprice.com/stickynote.htmWith StickyNote 9.0, you can create beautiful 3D notes... Read More
If you use Microsoft Outlook (or similar applications) for e-mailing,... Read More
Microsoft Business Solutions products: Great Plains, MS CRM, Navision, Axapta,... Read More
Finally, you have some time to personalize your desktop with... Read More
You turn on your computer, and it doesn't look quite... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
Microsoft Business Solutions Small Business Manager is scaled down Great... Read More
.Net Framework is a platform or development environment to seamlessly... Read More
.NET platform does not support multiple inheritance. Do not confuse... Read More
Enabling Chinese input is quick and easy, there are only... Read More
Software |