.NET :Solving the Multiple Inheritance Issue Under .NET Platform

.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.

residential cleaning services Lake Forest ...
In The News:

Cleverbridge says hackers copied card numbers, expiration dates and CVV codes in a data breach, and it offers credit monitoring to affected cardholders.
Theia3D uses markerless motion capture to study how walking changes with age, tracking joint movement in older adults wearing everyday clothes.
Citi's updated banking agreement warns that actions by third-party AI agents may be treated as authorized by you, even after a hack leaks your credentials.
Uber Kids lets children as young as 10 ride alone in a pilot across Austin, Nashville and Madison, with live video, PIN verification and RideCheck alerts.
Kurt "CyberGuy" Knutsson explains why stolen data can resurface years after a breach, plus tips on free credit freezes and password managers.
Sean Duffy flew a $148,000 Jetson One solo over NASA's Kennedy Space Center. Two days later, five eVTOLs flew in formation at a public airshow.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
An AI bionic eye trained on a blind man's brain responses helped UC Santa Barbara researchers produce more predictable phosphenes with less current.
A researcher claims Google Gemini pulled private Gmail billing details into chats, and Google confirms some connected-app data may face human review.
Housefishing scams use AI real estate photos to fool buyers. Google Lens reverse image search and live video walkthroughs can help expose the fakes.
Data brokers may expose your name, home address and phone number to scammers sending fake USPS delivery texts ahead of the Black Friday shopping rush.
Remus Stealer malware developers claim Gmail access survives a password change, but Google says the attack targets infected devices, not a Gmail flaw.
Palmer Luckey says SLAB, his floating industrial city, would last 1,000 years, hosting metal processing and oil refining beyond California rules.
United Airlines is blocking unauthorized AI travel agents from its booking systems, warning that automated purchases could put MileagePlus miles at risk.
Apple's macOS 27.3 beta 2 adds new Mac security controls for AI agents, letting you pick specific protected folders instead of granting Full Disk Access.
Google's AI used smartwatch sensors to spot hypertension without a blood pressure cuff, but the Nature study found it missed about 1 in 3 cases.
The FBI warns the ARTEX AI hacking tool can give criminals privileged access in under three hours, targeting Microsoft 365 and financial firms.
The FDA-authorized Virtuoso Endoscopy System uses needle-sized robotic arms to remove bladder tumors intact, helping pathologists assess detrusor muscle.
Identity theft restoration involves credit freezes, fraud alerts and disputing fraudulent records. Here's how the recovery process works, step by step.
Genesis AI raised $500 million to expand its general-purpose robot Eno, which learns physical skills from workers wearing special electronic gloves.
JPMorgan Chase says hackers accessed marketing data at third-party vendors as an extortion group leaks records tied to Visa and Mastercard customers.
Uber Parking launches in 15 U.S. cities after the SpotHero deal, offering upfront prices, Uber One credits, and a future role for robotaxis in garages.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
Microsoft Outlook flaw CVE-2026-124194 lets a malicious .msg file expose NTLMv2 authentication data, and Microsoft confirms hackers already exploited it.
Former Secret Service cyberfraud investigator Jason Brown warns AI voice cloning scams could trick families into losing thousands of dollars this holiday season.

Computer Phones ? Facts and Fallacies

The stakes are high when considering security, privacy, and savings,... Read More

Microsoft Great Plains Implementation in Russia ? Overview for Consultant

Microsoft Business Solutions Great Plains is very popular ERP platform... Read More

Adware and Spyware Blockers

The most important things you can do for your computer... Read More

Microsoft Great Plains Implementation: Verticals - Wholesale Order Entry center ? overview

Microsoft Business Solutions Great Plains has substantial market share and... Read More

Microsoft Great Plains FA: Fixed Assets ? Overview For Consultant

Great Plains Fixed Assets Management module is a robust tool... Read More

Did You Ever Want to Completely Erase Everything on Your Computer?

Did you ever want to erase everything on your computer?... Read More

Constructionalist Parsing - Deciphering Natural Language

The research in the field of Natural Language Processing usually... Read More

The Importance of Timely Timesheets

Whether you are a small consultancy firm, a medium sized... Read More

How to Choose the Right Accounting Software for Your Business

With any good luck and a good amount of hard... Read More

Microsoft Great Plains SOP: Sales Order Processing

Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More

Collaboration Software: Index of Collaboration Software Technologies

Collaboration SoftwareCollaboration Software, also known as group collaboration software or... Read More

What is Preventive Maintenance Software?

Preventive Maintenance (PM) is defined as scheduled work done on... Read More

IT Department Skills to Support Microsoft Great Plains and Microsoft CRM

Microsoft Great Plains as ERP and Microsoft CRM as... Read More

Marketing Your WinRunner Team

It won't matter how effective your WinRunner Team is if... Read More

Kick-Ass Performance For Your PC? Its Easy

Is your PC is slow and wimpy? Then you need... Read More

Microsoft Great Plains Oil & Gas ? Implementation & Customization Highlights

Microsoft Great Plains serves the wide spectrum of horizontal markets.... Read More

Scrap Booking Online: Word Perfect or Corel Graphics Suite?

Scrapbooks are very popular these days. I think that almost... Read More

CRM 101: Customer Relationship Management for Beginners

Customer Relationship Management, abbreviated "CRM," is the term for a... Read More

String in Java

Handling character strings in Java is supported through two final... Read More

Crystal Reports for Microsoft Great Plains

Microsoft Business Solutions ? Great Plains is designed to meet... Read More

Microsoft Business Solutions VAR/Partner Selection ? Overview for IT Director/Manager/Controller

Microsoft Great Plains and Microsoft CRM become more and more... Read More

Crystal Reports - Microsoft SQL Server

Microsoft SQL Server is the leader for inexpensive and middle... Read More

Put Some Pizazz in Your Software Arsenal

The software giants don't do everything and don't always produce... Read More

Microsoft CRM Programming Secrets ? Tips For Developers

This article is for advanced Microsoft CRM SDK C# developers.... Read More

Running a Program on a Remote Server Using SSH

How do you run a program on a remote server... Read More

interior house cleaning Arlington Heights ...