.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.
Batchtown Chicago prom limo .. Lockport Chicago limo O’HareMicrosoft Business Solutions CRM is now approaching the phase of... Read More
Microsoft Business Solutions Great Plains has substantial market share and... Read More
Think of this, first we had the HAM Radio, then... Read More
.Net Framework is a platform or development environment to seamlessly... Read More
I suggest that you do not spend a lot of... Read More
If you would like to pick something from Microsoft, or... Read More
"Pfishing", sometimes spelled "Phishing", is a word that's used to... Read More
While Adobe is the most known maker of PDF tools,... Read More
MicroWorld Technologies, Inc. the leading solutions provider in the area... Read More
The Microsoft system preparation utility for Windows 2000 is a... Read More
Follow the steps below to quickly design, generate, and deploy... Read More
Microsoft Great Plains - Microsoft Business Solutions accounting and ERP... Read More
In the previous ISDN article, we looked at how and... Read More
People often ask me: What image file formats will Photoshop... Read More
Microsoft Business Solutions CRM data conversion deserves FAQ type of... Read More
When you own a small business, time is money. And... Read More
Microsoft Business Solutions Great Plains and MS CRM (client relation... Read More
Creating a new markup language.Introduction.General Reuse Markup Langauge, or GRML,... Read More
This article illustrates the best practices to improve the performance... Read More
Microsoft Business Solutions CRM is present several years on the... Read More
While paper labeling CDs and DVDs may appear to be... Read More
2005 ? Back to the Future.What does the future hold?... Read More
How do you run a program on a remote server... Read More
If you have Microsoft Great Plains and support it for... Read More
The major reason I recommend getting your hands on real... Read More
shuttle from Midway Munster are ..Did you ever want to erase everything on your computer?... Read More
I suggest that you do not spend a lot of... Read More
Microsoft Business Solutions Great Plains was purchased from Great Plains... Read More
Microsoft Great Plains is now targeting large and midsize businesses... Read More
Ad-Aware and Spybot are probably the two most well known... Read More
Microsoft Business Solutions Great Plains has several options to enable... Read More
Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More
Microsoft Great Plains could be tuned and setup to fit... Read More
Vince Lombardi once said that, "The achievements of an organization... Read More
Microsoft Business Solutions Great Plains might be considered as ERP... Read More
Great Plains Purchase Order Processing (POP) module makes up one-third... Read More
If you're online using a dialup Internet connection, you'll probably... Read More
When it comes to screenplay software each screenwriter needs to... Read More
Microsoft Great Plains is now standard mid-market ERP application, serving... Read More
Currently Microsoft Business Solutions is on the way of creating... Read More
Most people understand that the "hardware" part of their computer... Read More
What is Software?Software is a set of instruction written to... Read More
In this short FAQ style article we would like to... Read More
Remember nice and prosperous Clinton era? When you implemented innovative... Read More
Assertion facility is added in J2SE 1.4. In order to... Read More
There are two approaches for application integration:? Programmer's approach ?... Read More
ERP Consulting industry is on the way to serve clients... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
Whether you are an experienced web programmer or a complete... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Software |