.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.
cleaning service near Bannockburn ..This article is for advanced Microsoft CRM SDK C# developers.... Read More
"Pfishing", sometimes spelled "Phishing", is a word that's used to... Read More
The cornerstone of successful automated office systems is the ability... Read More
Microsoft Business Solutions Great Plains is very generic accounting application... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
According to a survey conducted by InfoTrends/CAP Ventures entitled "Content-Centric... Read More
Microsoft CRM and IBM Lotus Notes Domino seem to be... Read More
What is a Web Database?A web database is a database... Read More
If you've been using MySQL database to store your important... Read More
Security flaws have long plagued Internet Explorer (IE), the market-dominating... Read More
Our hosted solution allow you to run your own search... Read More
The world of small business accounting software can be a... Read More
If you are to buy a HelpDesk & Asset Management... Read More
Accounts payable is just one area of office management where... Read More
With thousands of web pages added to the Net every... Read More
It could just be me, but my experiences with document... Read More
No matter how much you enjoy your favorite screensavers, sometimes... Read More
The adware and spyware definitions list is very long. But... Read More
If you would like to pick something from Microsoft, or... Read More
What is RAID RECOVERY?RAID stands for Redundant Array of Inexpensive... Read More
Microsoft Retail Management (RMS) and Microsoft Great Plains are retail... Read More
I love new technology. I am still ready to wait... Read More
In this small article we will show you the possible... Read More
Which Type of Shop Can Rely On A Home Built... Read More
Here is some free software tools to help you build... Read More
pet-friendly home cleaners Mundelein ..What is Snort?Snort is an open source network intrusion detection... Read More
Microsoft Business Solutions main middle market ERP application - Microsoft... Read More
Sticky Noteshttp://www.deprice.com/stickynote.htmWith StickyNote 9.0, you can create beautiful 3D notes... Read More
Language development computer: Computer-based method for aiding language development seems... Read More
Document Management or Enterprise Information Management is perhaps one of... Read More
Music downloads are off the charts! We're listening to digital... Read More
Programming Help for BeginnersWe write programs to instruct computers. When... Read More
If you feel intimidated when someone tries to teach you... Read More
What is Interactive Mapping?Interactive mapping is a visual display medium... Read More
Bad News - the Threat is Bigger than it SeemedHow... Read More
Are you lost in the mess of documents that get... Read More
Our opinion is based on our Microsoft Business Solutions Great... Read More
At the end of XX century, in the late 1990th... Read More
Should one use Windows Update?This topic has good and valid... Read More
Document Manager and Version HistoryIn previous articles I have discussed... Read More
Words we choose to describe things and phenomena often show... Read More
Microsoft Business Solutions Great Plains was designed back in the... Read More
How would you like to prevent spyware and adware from... Read More
An integral part of any quality CRM system is lead... Read More
Whether you are a small consultancy firm, a medium sized... Read More
Microsoft Business Solutions Great Plains is very popular ERP platform... Read More
It is really interesting that a bug can create problem... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
When it comes to running an office, the SOHO entrepreneur... Read More
Microsoft Business Solutions Great Plains serves multiple industries in the... Read More
Software |