.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.
limo prices to midway Crystal Lake west of Randal .. Lockport Chicago limo O’HareIn 2004 Oracle, Inc. made its new step toward J2EE... Read More
Customer Relationship Management or CRM is a combination of enterprise... Read More
If you look back to the history, you will see... Read More
The Software 2005 conference is now a wrap. This conference,... Read More
Is Photoshop CS2 worth the upgrade? You bet it is!... Read More
The purpose of Project Management Software is to provide an... Read More
In the case when you represent mid-size or mid-size-to-large business,... Read More
Stop the Runaway MouseWhat's the "runaway mouse?" You've seen it...you... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
Microsoft Business Solutions Great Plains is very popular ERP/MRP applications... Read More
Imagine something that follows you home and sets itself up... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Microsoft Great Plains is main mid-market application from Microsoft Business... Read More
Mapping Software Improves Data VisualizationFrom the outset, it is important... Read More
Innovative Maintenance Systems (IMS) is one company that offers solutions... Read More
Once a business idea is selected, it is highly recommended... Read More
Every day millions of new web documents emerge on the... Read More
When you own a small business, time is money. And... Read More
Are you a database professional? Do you work with a... Read More
The most important benefit of XML is its simplicity. Though... Read More
Are you one of those people that keeps track of... Read More
When it comes to running an office, the SOHO entrepreneur... Read More
According to a survey conducted by InfoTrends/CAP Ventures entitled "Content-Centric... Read More
Microsoft SQL Server is the leader for inexpensive and middle... Read More
Most people don't use Photoshop to its fullest capabilities. Here... Read More
taxi o'hare Auburn ..While I was in college, if you would have asked... Read More
Bad News - the Threat is Bigger than it SeemedHow... Read More
COMMAND LINE FUNCTIONA powerful command line script processor has been... Read More
I've been active in the Cisco Certification track for four... Read More
Having from five to ten and more favorite screensavers is... Read More
The term "document management" and "paperless office" is the subject... Read More
Handling character strings in Java is supported through two final... Read More
Around the same time Microsoft made its move with .Net... Read More
Let us give you - developer some hints in the... Read More
Scrapbooks are very popular these days. I think that almost... Read More
Microsoft Great Plains fits to majority of horizontals and retail... Read More
In the Clinton era the status quo was simple: you... Read More
This article is for advanced Microsoft CRM SDK C# developers.... Read More
eStore Advantage allows front-office applications to communicate with back-office business... Read More
Some introduction into Great Plains Software products, now Microsoft Business... Read More
Find out why Spyware Removal from computers is important and... Read More
Microsoft Business Solutions Great Plains has substantial market share and... Read More
What is a Web Database?A web database is a database... Read More
Document Management or Enterprise Information Management is perhaps one of... Read More
Microsoft Business Solutions Great Plains was purchased from Great Plains... Read More
Security flaws have long plagued Internet Explorer (IE), the market-dominating... Read More
When it comes to running an office, the SOHO entrepreneur... Read More
Microsoft CRM is new player on the CRM software... Read More
Stealing company information used to be the specialty of spies... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
Software |