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

house cleaning company Glencoe ...
In The News:

Ahold Delhaize's cybersecurity incident knocked online ordering and digital coupons offline at Stop & Shop, Food Lion, Hannaford and Giant Food stores.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
Amazon's About You feature includes personality details from your shopping history, and some shoppers are finding hilariously awkward results.
Identity theft recovery starts with securing bank accounts, freezing credit and enabling two-factor authentication within the first 24 hours.
Apple's $299 HomeView smart display uses facial recognition to personalize screens for up to six household members and show live security camera feeds.
Domonique DuBose spotted red flags when a man on Hinge with 85,000 followers and a blue checkmark claimed to be a San Francisco 49ers player.
Your phone's location data can expose visits to doctors, pharmacies and places of worship. The FTC took action against data brokers selling this data.
Hackers targeted Danfoss refrigerator controls across French supermarkets, forcing chains like Carrefour and Monoprix to discard massive food stocks.
iOS 27 finally lets iPhone Shared Albums store photos and videos at full resolution in iCloud, but new items count toward the owner's storage.
A fake Facebook Marketplace text scam uses your real name as the seller to trick you into replying, and Malwarebytes warns even one response helps.
The Pentagon data breach exposed 2.76 million Social Security numbers and military records, raising long-term identity theft concerns for veterans.
Kodiak AI plans to haul IKEA freight on Texas highways with no one in the cab, raising urgent cybersecurity and safety questions for drivers.
Apple Intelligence in iOS 27 adds Extend and Reframe tools to Photos, letting iPhones generate new background areas beyond your original borders.
Microsoft's X account was hijacked to promote a crypto pump-and-dump scheme, exposing its more than 13 million followers to a scam campaign.
Scammers can combine your name, phone number and address with data breach details to attempt SIM swaps, phishing and even identity theft schemes.
ChatGPT Work, Meta Muse and Gemini Spark can monitor flight prices, sort your email inbox and track important deadlines, but savvy users start small.
iPhone, Samsung Galaxy and Google Pixel each hide a built-in tool that turns a video frame into a separate photo without any screenshot needed.
Operation KillSwitch dismantled KillSec's ransomware infrastructure, but investigators say a 16-year-old allegedly ran the entire cybercrime operation.
The Fox News Artificial Intelligence newsletter covers where voters will decide on AI data center ballot measures and Jeff Bezos' tech vision.
Apple's Impersonation Risk Detection in iOS 27 can flag suspicious activity inside apps, but the setting is off by default and must be enabled.
Federal Election Commission records can expose your name, address, employer and donation history once contributions exceed the $200 threshold.
Cybersecurity expert Morgan Wright says human skepticism remains the strongest defense against AI-driven phishing scams and voice cloning fraud schemes.
iPhone, Google Pixel and Samsung Galaxy each handle security updates differently, and one screen saying "up to date" may not tell the whole story.
Deborah Del Mastro heard what sounded like her daughter's terrified voice on the phone, launching a five-hour virtual kidnapping scam ordeal.
Hotel TV privacy risks go beyond forgotten passwords when you sign into Netflix or other streaming apps on shared devices you don't control.

MicroWorld Releases New Version of MailScan Ver. 4.5 - Antivirus and Content Security Software

MicroWorld Technologies, Inc. the leading solutions provider in the area... Read More

How To Choose A Fire Wall Software Program

In the real world a "fire wall" is a fireproof... Read More

Great Plains Dexterity ? Microsoft Great Plains Customization Overview

Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More

Microsoft CRM ? Typical Customizations

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

Why Java RDBMS?

It is a well known fact that Java as a... Read More

CROOK: A Methodology for the Refinement of Forward-Error Correction

Table of Contents1) Introduction 2) Related Work 3) Framework 4)... Read More

Lotus Domino/Notes - Microsoft Great Plains Tandem as ERP with Documents Workflow - Overview for IT

Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More

Downloading Spyware Removers: Think Before, not After

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

Computer Based Language Development and Spell-checking

Language development computer: Computer-based method for aiding language development seems... Read More

Antivirus Software ? Get The Bugs Before They Get You!

You turn on your computer, and it doesn't look quite... Read More

How to Make Own CMS

Every day millions of new web documents emerge on the... Read More

eCommerce development for Microsoft Great Plains: tools and highlights for programmer

Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More

Microsoft Great Plains Integrations ? Retail Management Sample

Microsoft Business Solutions is emerging as very attractive vendor for... Read More

10 Programming Tips

(1) Avoid using the same variable again and again for... Read More

Microsoft Great Plains Reporting ? Overview for Developer

Looks like Microsoft Great Plains becomes more and more... Read More

Free Program Removes Spyware not Detected by Premium Security Scan

What is Spyware?Spyware monitors your surfing habits and sends the... Read More

10 Things You Could be Using Photoshop For, But Probably Arent

Most people don't use Photoshop to its fullest capabilities. Here... Read More

SSH (SCP) Send Files from Windows to Your Linux Box

Not all of us have the luxury of working both... Read More

Software Piracy

SOFTWARE PIRACY We regularly hear reports... Read More

Professional Software Icons For Your Standalone Application

User interfaces and accessibility are some of the most important... Read More

Google Brings the Earth to Your Desktop

Google Inc. has launched a new software package that allows... Read More

Causes of ERP Failures

ERP is the acronym of Enterprise Resource Planning. Multi-module ERP... Read More

Fleet Maintenance Software Reviews

Innovative Maintenance Systems (IMS) is one company that offers solutions... Read More

Reduce TCO: The Java Database Way

TCO (Total Cost Ownership) is the buzzword in... Read More

25 Things Mapping Software Can Do For You

1. With mapping software you can create a report that... Read More

kitchen deep cleaning Winnetka ...