.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.
Wood Dale Chicago prom limo .. Lockport Chicago limo O’HareMicrosoft Business Solutions Great Plains is marketed for mid-size companies... Read More
When Great Plains Software was designing and developing Great Plains... Read More
Microsoft Great Plains is becoming more and more popular and... Read More
SAP Inc., a global leader in client/server enterprise application software... Read More
When you buy a computer, it most likely comes with... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Spyware is software or hardware installed on a computer without... Read More
Microsoft Great Plains, former Great Plains Software Dynamics / eEnterprise... Read More
Let's say that you have a software project that's under... Read More
Now is the time to look at an alternative to... Read More
The java programming language is becoming more and more popular... Read More
Microsoft Great Plains, designed back in 1990th as database transferable... Read More
The stakes are high when considering security, privacy, and savings,... Read More
With so many Microsoft Windows related viruses, errors, and other... Read More
Finding the best spyware removers to detect and remove spyware... Read More
According to a survey conducted by InfoTrends/CAP Ventures entitled "Content-Centric... Read More
Vince Lombardi once said that, "The achievements of an organization... Read More
The cornerstone of successful automated office systems is the ability... Read More
Music downloads are off the charts! We're listening to digital... Read More
Microsoft Business Solutions Great Plains has many years of successful... Read More
Microsoft Business Solutions ? Great Plains has captured the US... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
SyncUp, a file synchronizer is designed to assist the home... Read More
If you copy something from a Web site or elsewhere...... Read More
Assertion facility is added in J2SE 1.4. In order to... Read More
Antigo wedding limo ..Stealing company information used to be the specialty of spies... Read More
Microsoft Great Plains and Microsoft CRM become more and more... Read More
Sometimes your PC will start acting strange for no apparent... Read More
IBM Lotus Domino or Microsoft Exchange?The severe competition continues for... Read More
Most people don't use Photoshop to its fullest capabilities. Here... Read More
Microsoft Great Plains may be recommended for international freight forwarding... Read More
Security flaws have long plagued Internet Explorer (IE), the market-dominating... Read More
I have yet to see a business that, sometimes in... Read More
Microsoft Client Relation Management system (Microsoft CRM) and Microsoft RMS... Read More
Hi, Guys,I believe a lot of programmers are trying to... Read More
Microsoft Business Solutions ? Great Plains has captured the US... Read More
You might think you don't need a firewall... Read More
What is Spyware?Spyware monitors your surfing habits and sends the... Read More
CD and DVD replication is a process that works by... Read More
Microsoft Business Solutions Great Plains fits to majority of horizontal... Read More
Finding the best spyware removers to detect and remove spyware... Read More
IBM Lotus Notes Domino and Microsoft CRM (Client Relation Management)... Read More
In the early days of the personal computer, we're talking... Read More
Microsoft Great Plains fits to majority of industries, in the... Read More
Icons are used everywhere; right from software applications, to internet... Read More
XML parser is a software module to read documents and... Read More
Music downloads are off the charts! We're listening to digital... Read More
The Windows Indexing Service provides you with the ability to... Read More
For a long time now Microsoft's Internet Explorer has ruled... Read More
Microsoft Business Solutions Great Plains is written in Great Plains... Read More
Software |