VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Inheritance Without Containment

Kamilche  (35 Submissions)   Object Oriented Programming (OOP)   Visual Basic 5.0   Advanced   Wed 3rd February 2021

This example illustrates how to set up inheritance in VB, without using containment ('has-a') processing. The data structure is very flexible, as each class and object instance is basically a hash table (a dictionary in VB). It usess 'CallByName' to call the appropriate routine based on type, at runtime. Note that this could be made much more efficient and speedy by using a custom hash table class and enums instead of strings for properties, but I left that out to simplify this example.

Rate Inheritance Without Containment (3(3 Vote))

Download Inheritance Without Containment

Inheritance Without Containment Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters