.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.
detailed home cleaning Park Ridge ..IntroductionSurprised, by the title? well, this is a tour of... Read More
In our small article we'll consider Microsoft Business Solutions Great... Read More
Fundraising software lets you connect with donors in a way... Read More
Once upon a time not so long ago, there was... Read More
Microsoft Business Solutions Great Plains has I'd say end user... Read More
Microsoft Great Plains is now standard mid-market ERP application, serving... Read More
Simply put, fleet maintenance allows companies to monitor and maintain... Read More
Microsoft Retail Management (RMS) and Microsoft Great Plains are retail... Read More
So, why should you use any O/R mapping tool? I... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Every day millions of new web documents emerge on the... Read More
Microsoft Business Solutions Great Plains has substantial market share and... Read More
There are so many different programs that clutter up your... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
Let us give you - developer some hints in the... Read More
ERP Consulting industry is on the way to serve clients... Read More
When Windows fails to boot it is normally caused by... Read More
As Mozilla Firefox nears 10% market share, with well over... Read More
Microsoft Business Solutions Great Plains fits to majority of horizontal... Read More
Microsoft Business Solutions CRM is present several years on the... Read More
Microsoft Business Solutions Great Plains is very popular ERP platform... Read More
The stakes are high when considering security, privacy, and savings,... Read More
Microsoft Business Solutions is now in process of creating so... Read More
.Net Framework is a platform or development environment to seamlessly... Read More
express cleaning service Des Plaines ..Professional services firm cuts costs and improves productivity with integrated... Read More
As Mozilla Firefox nears 10% market share, with well over... Read More
Rapid Application Development (RAD) is a software development methodology. In... Read More
There are so many different programs that clutter up your... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
Microsoft Great Plains, Navision, Solomon and Axapta are Microsoft Business... Read More
OEComplete is a utility for managing the personal information of... Read More
When you first think about multicurrency ? you probably have... Read More
Microsoft Great Plains and Microsoft CRM become more and more... Read More
GroupwareEfforts are continually made to manage the unavoidable ad hoc... Read More
Learning how to program software seems like a daunting task... Read More
Costs of fleet maintenance software can vary widely. It is... Read More
Before being able to choose a secure Internet communication system,... Read More
eStore Advantage allows front-office applications to communicate with back-office business... Read More
Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More
This tutorial covers OLAP solutions used by Data warehouses and... Read More
What is Snort?Snort is an open source network intrusion detection... Read More
Microsoft Business Solutions is now in process of creating so... Read More
The Software 2005 conference is now a wrap. This conference,... Read More
What is Tripwire?Tripwire is a form intrusion detection system (IDS)... Read More
Microsoft Business Solutions Great Plains was purchased from Great Plains... Read More
An operating system (abbreviated OS) is essentially the path through... Read More
What is Spyware?Spyware monitors your surfing habits and sends the... Read More
You turn on your computer, and it doesn't look quite... Read More
Microsoft Business Solutions products: Great Plains, MS CRM, Navision, Axapta,... Read More
Software |