.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.
home cleaning services Bannockburn ..Follow the steps below to quickly design, generate, and deploy... Read More
DBxtra is a powerful query and reporting tool that hides... Read More
It is now common thing when large corporation selects mid-market... Read More
The US House of Representatives has recently passed the "Spy... Read More
Microsoft Business Solutions Great Plains serves multiple industries in the... Read More
We don't think about mainframe software pricing anymore, we just... Read More
Microsoft Business Solutions CRM and IBM Lotus Notes Domino, being... Read More
We will base our prognosis on our Microsoft Business Solutions... Read More
I have recently created my first Php program. I wanted... Read More
Cyberspace has opened up a new frontier with exciting possibilities... Read More
Most people don't use Photoshop to its fullest capabilities. Here... Read More
FTP stands for "file transfer protocol". FTP is basically a... Read More
Bad News - the Threat is Bigger than it SeemedHow... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
As you probably know, when Microsoft purchased Great Plains Software... Read More
An operating system (abbreviated OS) is essentially the path through... Read More
Best Software Act! is very popular CRM for small and... Read More
When Great Plains Software was designing and developing Great Plains... Read More
Microsoft Business Solutions Great Plains has I'd say end user... Read More
We've all seen the ads on TV for Netzero 3G.... Read More
Learning how to program software seems like a daunting task... Read More
When you think... Read More
While Adobe is the most known maker of PDF tools,... Read More
The Microsoft system preparation utility for Windows 2000 is a... Read More
So, why should you use any O/R mapping tool? I... Read More
eco-friendly cleaning service Winnetka ..Microsoft Business Solutions Great Plains might be considered as ERP... Read More
Upgrading. Downtime. Maintenance. Hardware obsolescence. Implementation issues. The litany of... Read More
(1) Avoid using the same variable again and again for... Read More
New post-recession era has new features, which didn't exist in... Read More
The first topic we are going to discuss... Read More
In linux, one of great commands for finding out information... Read More
This is intermediate level SQL scripting article for DB Administrator,... Read More
During the years of our consulting practice, which comes back... Read More
Usually workflow & messaging is realized in CRM and then... Read More
Adobe Photoshop is one of the world's leading graphics editing... Read More
There are two major WYSIWYG(What You See Is What You... Read More
Simply put, fleet maintenance allows companies to monitor and maintain... Read More
The adware and spyware definitions list is very long. But... Read More
Microsoft Great Plains, designed back in 1990th as database transferable... Read More
It is now common thing when large corporation selects mid-market... Read More
IntroductionPHP can be used for a lot of different things,... Read More
In this small article we will be looking at the... Read More
Microsoft Business Solutions Great Plains has I'd say end user... Read More
CD and DVD replication is a process that works by... Read More
It???s easy to understand why you might be drawn to... Read More
As you probably know, when Microsoft purchased Great Plains Software... Read More
I started using PIP (Picture It Publishing) Platinum 2002 right... Read More
Accounts payable is just one area of office management where... Read More
This article illustrates the best practices to improve the performance... Read More
The research in the field of Natural Language Processing usually... Read More
Software |