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

home cleaning services Bannockburn ..
In The News:

Friendly text conversations about BBQs and social events can lead to WEEX gold trading scams that target older adults with fake investment opportunities.
California company Skyeports creates self-healing glass spheres from Moon regolith that generate solar power and support plant growth for sustainable lunar living.
Cleafy researchers discover fake VPN streaming app Mobdro Pro that installs Klopatra banking Trojan, giving attackers full control over Android devices.
Police departments across the U.S. and Canada are adopting virtual reality training to better prepare officers for high-pressure, real-world situations.
House Bill 469 would prevent AI systems from owning property, serving as executives, or gaining legal personhood in Ohio under Representative Thaddeus Claggett's proposal.
Public voter records expose retirees' personal details to election scammers who create targeted cons using names, addresses, and voting history data.
Instead of fearing what comes next with artificial intelligence, think outside the box. Here are high-earning AI jobs that don't require a computer science degree.
OpenAI CEO Sam Altman says polite words like "please" and "thank you" cost millions annually, while direct prompts may improve ChatGPT accuracy by several points.
Chattee Chat and GiMe Chat exposed intimate conversations and photos, revealing users spent up to $18,000 on AI companions before the breach.
New Instagram parental controls allow families to manage teen screen time and content limits through the Family Center with stricter safety settings.
Third-party security breach at Discord exposes sensitive user information including government IDs, highlighting cybersecurity risks from external service providers.
Survey of 1,000 students shows teens using AI for personal relationships while two-thirds of parents remain unaware of their children's AI usage.
Cybersecurity experts warn about a ShadowLeak vulnerability that weaponized ChatGPT's Deep Research agent to steal personal data from Gmail accounts through hidden commands.
Tesla's Full Self-Driving system faces federal investigation following 58 reports of crashes, with six vehicles running red lights before colliding with other cars.
The Fox News AI Newsletter brings you the latest developments on artificial intelligence, with news on OpenAI moving to soon allow erotica for adult users.
Eric Schmidt alerts that hackers can reverse-engineer AI models to bypass safety measures, citing examples like the jailbroken ChatGPT variant called DAN.
Cybercriminals exploit Microsoft Teams through impersonation, malicious links and fake profiles to gather intel and deliver ransomware to personal and work devices.
Google, Dior, Allianz and dozens of other companies lost sensitive customer data in Salesforce-related breaches affecting millions of records across multiple sectors.
Apple launches iOS 26 with new Preview app that combines document editing, PDF annotation and scanning features into one streamlined iPhone experience.
New AI road monitoring system uses sensor-embedded fabric to predict infrastructure problems, potentially reducing maintenance costs and traffic disruptions for cities.
Holiday charity scams target retirees through lookalike organization names, untraceable payment requests, and data broker information to steal donations.
The Federal Trade Commission says criminals are posing as IRS agents, law enforcement officers or other officials, often over the phone or online, to steal thousands of dollars at a time.
AI phishing scams now use voice cloning and deepfake technology to trick victims, but Kurt "CyberGuy" Knutsson reveals warning signs to watch for.
Inversion Space unveils Arc, a reusable reentry vehicle that can deliver up to 500 pounds of cargo from orbit to anywhere on Earth in under an hour.
Red flags like processing fees, urgent countdowns and requests for full Social Security numbers expose fraudulent settlement sites targeting consumers.

Five Steps to Rapid Development with TierDeveloper 4.0

Follow the steps below to quickly design, generate, and deploy... Read More

Database Guru James F. Koopmann Reviews DBxtra Reporting and Query Tool

DBxtra is a powerful query and reporting tool that hides... Read More

Microsoft Great Plains Payroll Module Customization Scenarios

It is now common thing when large corporation selects mid-market... Read More

The End of Spyware?

The US House of Representatives has recently passed the "Spy... Read More

Microsoft Great Plains: Data Conversion & Migration Scenarios ? Overview for Consultant

Microsoft Business Solutions Great Plains serves multiple industries in the... Read More

Brief Notes About Mainframe Software Pricing

We don't think about mainframe software pricing anymore, we just... Read More

Microsoft CRM Lotus Notes Domino Connector FAQ

Microsoft Business Solutions CRM and IBM Lotus Notes Domino, being... Read More

ERP System of the Future: Database, Business Logic and Interface

We will base our prognosis on our Microsoft Business Solutions... Read More

Simple Solution for Php Includes - IFrames

I have recently created my first Php program. I wanted... Read More

Inherent Dangers Of File Sharing Via The Internet.

Cyberspace has opened up a new frontier with exciting possibilities... 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

Exactly What Does FTP Stand for and What Can it do for Me?

FTP stands for "file transfer protocol". FTP is basically a... Read More

Most Dangerous Types of Spyware are on the Rise: How to Choose the Weapon

Bad News - the Threat is Bigger than it SeemedHow... Read More

Great Plains Dexterity Programming ? Overview For Developer

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

Microsoft Great Plains on Ctree or Pervasive SQL ? What to Do ? Tips for IT Manager

As you probably know, when Microsoft purchased Great Plains Software... Read More

OS 101: Suggestions for Choosing an Operating System

An operating system (abbreviated OS) is essentially the path through... Read More

Microsoft CRM: Data Conversion ? Import from Act!

Best Software Act! is very popular CRM for small and... Read More

Microsoft Great Plains Customization and Development ? Overview for Programmer

When Great Plains Software was designing and developing Great Plains... Read More

Microsoft Great Plains Integration Manager: Using Continuum ? Overview for Developer

Microsoft Business Solutions Great Plains has I'd say end user... Read More

The Truth: Netzero 3G

We've all seen the ads on TV for Netzero 3G.... Read More

Start Developing Your Own Software

Learning how to program software seems like a daunting task... Read More

Is Your Family Protected?

When you think... Read More

Dont Choose Adobe When Working With PDF

While Adobe is the most known maker of PDF tools,... Read More

About Microsoft Sysprep (System Preparation) Utility (Windows 2000)

The Microsoft system preparation utility for Windows 2000 is a... Read More

Five Reasons for Using an O/R Mapping Tool

So, why should you use any O/R mapping tool? I... Read More

eco-friendly cleaning service Winnetka ..