.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.
reliable maid service Highland Park ..Current Microsoft Business Solutions Great Plains has more that 10... Read More
Words we choose to describe things and phenomena often show... Read More
Let's say that you have a software project that's under... Read More
Microsoft bought Navision, Denmark based software development company, along with... Read More
Although we don't know whether Microsoft ever envisioned such a... Read More
Customer Relationship Management (CRM) is a strategy and processes used... Read More
Microsoft Business Solutions Great Plains serves to the wide spectrum... Read More
Background: For many organizations like ours, the interim target of... Read More
Microsoft Business Solutions Great Plains has substantial market share among... Read More
As Mozilla Firefox nears 10% market share, with well over... Read More
Microsoft CRM is winning market share step-by-step from such the... Read More
RSS (Really Simple Syndication) is a way for a site... Read More
In linux, one of great commands for finding out information... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
I like my software simple. If it's too complex or... Read More
All of us know that Microsoft bought former Great Plains... Read More
IntroductionSurprised, by the title? well, this is a tour of... Read More
Are you lost in the mess of documents that get... Read More
Microsoft Great Plains serves majority of US based horizontal and... Read More
Some companies that are in need of fleet management may... Read More
In our case ? we serve Microsoft Business Solutions ERP... Read More
IBM Lotus Notes Domino and Microsoft CRM (Client Relation Management)... Read More
Did you ever give a thought to the number of... Read More
2005 ? Back to the Future.What does the future hold?... Read More
Spyware is software or hardware installed on a computer without... Read More
house cleaning company Lincolnshire ..Microsoft Great Plains is now standard mid-market ERP application, serving... Read More
Customer Relationship Management (CRM) is a strategy and processes used... Read More
Our company, Novaprof Inc., developed unique software - DB Integration.... Read More
We would like to give you several situations, when you... Read More
With this small article we are continuing Microsoft Business Solutions... Read More
Microsoft Business Solutions Small Business Manager is scaled down Great... Read More
When Great Plains Software was designing and developing Great Plains... Read More
Microsoft Business Solutions ? Navision is an integrated solution for... Read More
Spyware and Adware infest over 90 percent of computers in... Read More
It is really interesting that a bug can create problem... Read More
In this short FAQ style article we would like to... Read More
Upgrading. Downtime. Maintenance. Hardware obsolescence. Implementation issues. The litany of... Read More
Microsoft Business Solutions Great Plains has substantial market share among... Read More
Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More
Microsoft Business Solutions main middle market ERP application - Microsoft... Read More
Fortunately one of the most common reasons cited for the... Read More
Microsoft Great Plains and Microsoft Retail Management System (Microsoft RMS)... Read More
What is Groupware?Have you ever had to manage document collaboration... Read More
Microsoft SQL Server is the leader for inexpensive and middle... Read More
Are you one of those people that keeps track of... Read More
Once upon a time not so long ago, there was... Read More
Have you ever noticed that when you look at your... Read More
Stealing company information used to be the specialty of spies... Read More
GroupwareEfforts are continually made to manage the unavoidable ad hoc... Read More
The title of "software engineer" has got to be among... Read More
Software |