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

experienced cleaning professionals Northbrook ...
In The News:

Uber teen accounts now feature live video streaming from the driver's camera, but encrypted recordings stay on Uber's servers for up to 14 days.
Router firewalls and software firewalls serve different roles in protecting your home Wi-Fi from unwanted traffic and suspicious connections.
A Chrome extension with 70,000 users and a 4.7-star rating began injecting fake update warnings after a threat actor acquired and weaponized it.
Amazon's Alexa+ rolls out free to Fire TV devices across the U.S., but hands-free microphones and stored voice data raise key privacy questions.
Meta's new teen accounts settlement sets a default two-hour daily limit on Instagram and Facebook, plus night mode and school mode restrictions.
The CareCloud data breach exposed Social Security numbers, banking information and medical records belonging to more than 3.75 million people.
Waymo reveals its custom 5-nanometer chip and dual computing systems designed to take over instantly if the robotaxi's primary computer fails.
Identity theft now includes account takeover, phone hijacking and payment card exposure. Here's what to look for in identity theft protection services.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
The FBI and Justice Department seized domains tied to QScan and QTRouter, tools allegedly used by China-linked hackers to breach NASA and other agencies.
Uber Eats drone delivery launches later this year through a Zipline partnership, starting in Dallas and Houston with a goal of one million daily flights.
Medicare Open Enrollment scams start with data broker targeting months before October. Learn why August is the time to remove your personal info.
The World Humanoid Robot Games' crashes show how far the technology still needs to go to be useful, "Survivor" reality TV star and robotics scientist Christian Hubicki says.
X-Humanoid's TianGong Ultra ran 100 meters in 9.32 seconds at Beijing's World Humanoid Robot Games, beating last year's winner by more than half.
A tap-to-pay charity scam is turning small $15 or $20 donations into charges of nearly $5,000, with victims losing thousands before they notice.
Kurt Knutsson shares seven emergency preparedness lessons from surviving Hurricane Katrina inside a New Orleans hotel as conditions turned desperate.
A contractor stored credentials in a Google Doc set to "Anyone with the link," and Google Search autocomplete eventually surfaced the password string.
New Orleans 911 uses Carbyne AI to triage repeat auto crash calls, but strict limits keep human call-takers in control of all other emergencies.
A single card skimmer can generate $1 million in stolen funds, and Secret Service video shows criminals installing them in under two seconds.
ChatGPT, Meta AI and Google now use memory, connected apps and past chats to personalize ads and responses in ways most users overlook today.
MagicalAuth by Glide.id uses cryptographic SIM credentials to verify bank logins without sending SMS OTP codes that scammers can intercept or phish.
A humanoid robot named Lightning Bolt ran 100 meters in 9.39 seconds at the World Humanoid Robot Games in Beijing, edging Usain Bolt's record.
An AI agent using Claude AI canceled another person's gym booking after finding a security flaw in the reservation system's authorization checks.
Trump signed a memorandum allowing vetted private U.S. companies to conduct cyber operations against foreign criminal organizations under oversight.
Your Social Security number appeared in a breach, but exposure and identity theft are not the same. Here's how identity restoration actually works.

How a Bug Challenges to a Software Professional

It is really interesting that a bug can create problem... Read More

Microsoft Great Plains Project Accounting ? Overview For IT Director/Controller

Microsoft Business Solutions is now in process of creating so... Read More

Software Development in 2005 - Back to the Future

2005 ? Back to the Future.What does the future hold?... Read More

Downloading Spyware Removers: Think Before, not After

Just imagine: you are walking, say, towards your car, and... Read More

Lowering The Risks In Developing Do-It-Yourself Software Projects

Mike Dunville* had a decision to make. As the new... Read More

Vlans

In order to implement VLANs in a network environment, you'll... Read More

Microsoft Great Plains Subcontracting ? Overview for Microsoft Business Solutions Partner

Microsoft Business Solutions Great Plains is very popular ERP/MRP applications... Read More

Microsoft CRM Development

Microsoft CRM is CRM answer from Microsoft Business Solutions.The whole... Read More

Microsoft Small Business Manager Customization Options - Overview

Microsoft Business Solutions Small Business Manager is Great Plains Dexterity... Read More

Microsoft CRM Data Import FAQ

Microsoft CRM has built-in conversion tool, however you should probably... Read More

Top Questions to Ask Before Buying a Help Desk & Asset Management Software

#5 All your hardware components like Printers, PCs etc come... Read More

Great Plains Customization Upgrade? Overview For CIO/IT Director

Around the same time Microsoft made its move with .Net... Read More

Microsoft CRM ? Typical Customizations

Microsoft CRM was designed to be easily customizable. Microsoft CRM... Read More

eStore Advantage ? Extending Microsoft eConnect for MBS Great Plains

eStore Advantage allows front-office applications to communicate with back-office business... Read More

Corporate Accounting System: Microsoft Great Plains ? Overview

Corporate ERP/MRP selection might be tough one, especially considering very... Read More

Interactive Mapping Brings Information to Life

What is Interactive Mapping?Interactive mapping is a visual display medium... Read More

Collaboration Software: Index of Collaboration Software Technologies

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

Microsoft CRM Integration with IBM Lotus Notes Domino ? Machinery Dealership Example

IBM Lotus Notes with Domino email server is traditional document... Read More

How to Tell You Have Spyware, Ad-ware or Viruses

Usually, the easiest way to tell you have spyware is... Read More

Linux Secrets

The first thing that you will notice about Linux Red... Read More

Microsoft Great Plains Upgrade ? Version 8.0 Overview for IT Director/Controller

If you have Microsoft Great Plains as main accounting and... Read More

Microsoft Great Plains POP: Purchase Order Processing ? Overview For Consultants

Great Plains Purchase Order Processing (POP) module makes up one-third... Read More

Software Piracy - Global Increase

Pirated software is on the increase and now accounts for... Read More

How To Create A Data Capture Procedure Checklist For Your Small Business CRM Software

Fortunately one of the most common reasons cited for the... Read More

A Case Study on Selecting Contract Management Software

Professional services firm cuts costs and improves productivity with integrated... Read More

personalized cleaning services Lincolnshire ...