.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.
disinfecting cleaning services Buffalo Grove ..When you need a phone number, you do a quick... Read More
I have always had a tendency to focus on the... Read More
Microsoft Business Solutions Great Plains is Dexterity-written application and currently... Read More
Microsoft Retail Management System serves retail single store as well... Read More
Microsoft CRM has built-in conversion tool, however you should probably... Read More
Microsoft Great Plains has substantial mid-market share in the USA... Read More
If you are in a business that passes documents around... Read More
The java programming language is becoming more and more popular... Read More
I completed an experiment recently. I wanted to find out... Read More
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
Microsoft Business Solutions Great Plains was purchased from Great Plains... Read More
Finally, you have some time to personalize your desktop with... Read More
When Great Plains Software was designing and developing Great Plains... Read More
How many steps does it take you to locate and... Read More
An operating system (abbreviated OS) is essentially the path through... Read More
Microsoft Outlook is one of the most widely used software... Read More
Stealing company information used to be the specialty of spies... Read More
Microsoft Business Solutions Great Plains, Navision, Axapta, Solomon and CRM... Read More
Microsoft Business Solutions CRM is now approaching the phase of... Read More
According to a survey conducted by InfoTrends/CAP Ventures entitled "Content-Centric... Read More
Current Microsoft Business Solutions Great Plains has more that 10... Read More
TCO (Total Cost Ownership) is the buzzword in... Read More
Stop the Runaway MouseWhat's the "runaway mouse?" You've seen it...you... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Currently Microsoft Business Solutions is on the way of creating... Read More
spotless home service Arlington Heights ..Adware is a type of Spyware program that displays some... Read More
Have you noticed WordPerfect is gearing up for a comeback... Read More
Great Plains Inventory Management (IV) module gives your business a... Read More
Should one use Windows Update?This topic has good and valid... Read More
Introduction To ISDN, Part III: Configuring PPP PAP AuthenticationNow we... Read More
Microsoft Business Solutions Great Plains version 8.5, 8.0, 7.5, Great... Read More
Microsoft Business Solutions ? Navision is an integrated solution for... Read More
A UNIX Shell is in simplest terms, a command line... Read More
Have you ever noticed that when you look at your... Read More
The major reason I recommend getting your hands on real... Read More
How do you run a program on a remote server... Read More
Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More
Microsoft Business Solutions Great Plains has I'd say end user... Read More
Microsoft Business Solutions Great Plains is very good fit for... Read More
Cyberspace has opened up a new frontier with exciting possibilities... Read More
In order to implement VLANs in a network environment, you'll... Read More
The title of "software engineer" has got to be among... Read More
The US House of Representatives has recently passed the "Spy... Read More
Microsoft Great Plains and Microsoft Retail Management System (Microsoft RMS)... Read More
An integral part of any quality CRM system is lead... Read More
This article will not attempt to advocate the use of... Read More
Several software companies design programs for preventive maintenance. Most of... Read More
Microsoft Business Solutions Small Business Manager is Great Plains Dexterity... Read More
The first topic we are going to discuss... Read More
If there still are few unprotected computers left, I haven't... Read More
Software |