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

move in cleaning service Mundelein ..
In The News:

Kodiak Driver autonomous truck achieves perfect 98 safety score, matching top human fleets in groundbreaking AI evaluation by Nauto's VERA system.
New 401k catch-up contribution rules in 2026 will change taxes for high earners over 50. Learn how scammers exploit these changes and protect your retirement savings.
Kurt Knutsson's guide covers social media privacy protection through location settings, account privacy controls and two-factor authentication to prevent scams and data breaches.
Revolutionary retinal implant restores central vision in 80% of patients with advanced macular degeneration, offering hope where treatments once only slowed blindness.
Learn how to use passkeys on Windows and Mac computers without cameras or fingerprint readers. Discover secure authentication methods that replace passwords.
Tesla's FSD v14.1.2 update reintroduces Mad Max mode, enabling higher speeds and more frequent lane changes than the standard Hurry profile setting.
A phishing email scam targeting American Express customers shows how cybercriminals use fake urgent messages to steal personal and financial information.
Facebook's new Meta AI feature analyzes your camera roll photos to create polished collages automatically, but requires cloud processing and raises privacy concerns.
A New Jersey teenager filed a major lawsuit against AI/Robotics Venture Strategy 3 Ltd. over ClothOff, an AI tool that created fake nude images from her social media photos.
Microsoft reports Storm-2657 cybercriminals sent phishing emails to 6,000 addresses at 25 universities to steal payroll credentials and redirect funds.
Astronomers have discovered asteroid 2025 SC79, a skyscraper-sized space rock orbiting the sun in just 128 days. the second-fastest known.
The Fox News AI Newsletter delivers the latest developments form the world of artificial intelligence, including the technology's challenges and opportunities.
A cyberattack on SimonMed Imaging exposed personal information of 1.2 million patients, including medical records, financial details and identity papers.
Spotify's managed accounts for kids under 13 now available in at least seven countries, allowing parents to filter and block explicit content and songs.
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.

Microsoft Great Plains: exchange & brokerage ? implementation notes

If you company is small or mid-size special products or... Read More

10 Ways to Learn a Software

Following tips help you to learn a software in lesser... Read More

Putting Screensavers Under Control

No matter how much you enjoy your favorite screensavers, sometimes... Read More

Free Microsoft Word Online Training Tutorial Resources

Microsoft Word is one of the most popular office applications... Read More

Microsoft Moves to Small Business Accounting/Retail Market ? Stakes and Thoughts

In this small article we will be looking at the... Read More

10 Programming Tips

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

Seven Reasons Why a Hosted Inventory Management Solution Might Be Right For Your Organization

Upgrading. Downtime. Maintenance. Hardware obsolescence. Implementation issues. The litany of... Read More

Things You Can Do With Windows XP!

Did you ever give a thought to the number of... Read More

Cisco Certification: Introduction To ISDN, Part V

The major reason I recommend getting your hands on real... Read More

Should I Use Windows Update?

Should one use Windows Update?This topic has good and valid... Read More

PHP On-The-Fly!

IntroductionPHP can be used for a lot of different things,... Read More

Causes of ERP Failures

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

Corporate ERP: Microsoft Great Plains For The Plant In Brazil ? Overview For CIO

Microsoft Business Solutions Great Plains as new ERP for multinational... Read More

Microsoft Great Plains: Manufacturing or Bill of Materials - Overview for IT Specialist

Microsoft Great Plains is main Microsoft Business Solutions product, targeted... Read More

Rapid Application Development - Is it Really a Need of Today?

Rapid Application Development (RAD) is a software development methodology. In... Read More

Beware of The Pirated Software E-Mail Scams!

You have gotten those E_Mails buy software at deep discounts.... Read More

IT Strategy for Large Corporation: ERP/MRP/CRM, Unix/Linux/Windows, Microsoft/Java

Combining Microsoft Business Solutions Great Plains ERP with non-Microsoft Business... Read More

Databases ? How We Love to Hate Them!

You've finally created databases that you can actually use to... Read More

Increase Office Efficiency With One Simple Tool

When you need a phone number, you do a quick... Read More

Microsoft Great Plains in Construction & Building ? Implementation & Customization Highlights

Microsoft Great Plains could be tuned and setup to fit... Read More

Benefits of Shareware

Shareware has been fighting the stigma of being misunderstood for... Read More

Document Templates Give You The Perfect Framework For Your Documents

When it comes to running an office, the SOHO entrepreneur... Read More

Microsoft CRM Conversation Gateway: VoIP - Implementation & Customization

Microsoft CRM is winning market share step-by-step from such the... Read More

Theres Gold in Your Websites Server Log

Many Webmasters have never bothered to view their website's server... Read More

Run Your Own Search Engine

Our hosted solution allow you to run your own search... Read More

insured cleaning company Highland Park ..