Library tutorials & articles
Polymorphism in VB
By James Crowley, published on 14 Jul 2001
Introduction
Many of you will have heard of Polymorphism, but I also expect very few of you actually know what it is! In this tutorial, I try to explain exactly what polymorphism is, how to use it in Visual Basic, and why we should bother using it....
Related articles
Related discussion
-
VB6, SQL 2005 & DMO
by elajaunie3 (1 replies)
-
sending sms from pc
by sriraj20074 (0 replies)
-
Calling a function from ASP code
by dunk00 (3 replies)
-
GridView HyperLinkField Problem
by Paul2 (0 replies)
-
looking for help on asp
by cladironbeard (2 replies)
Related podcasts
-
Scott Guthrie
Scott catches up with Scott Guthrie in an interview covering Ajax, Asp 2.0, extender controls, CSS adapters and more.
Events coming up
-
Aug
27
Model-View-Presenter (MVC) in ASP.NET
San Francisco, United States
Model-View-Presenter (MVC) in ASP.NET Presenter Clayton Peddy, Terrace Software, Inc. Details TBD
If you need to access methods specific to that object, then you need to declare a variable for that object. For instance,
Dim obj As myActualObject
Set obj = New myActualObject
rather than the interface that myActualObject might be implementing...
good stuff this
Hi there,
Great article, very interesting. But when I tried to implement the idea it worked well until. When trying to create public methods in the Implementing Classes of the Interface other than the methods provided by the interface I stumbled upon a problem.
The autocompletion of VB6 could not find the methods, why is that? And when I type in the method by hand and run the app I get the error: Method or Data member not found
Which means that inspite of which type of Class I initialize I only have access to those methods that are implemented in the Interface class, is there a way around it? Or have I totally missunderstood it?
Rgds Sparvhok
This thread is for discussions of Polymorphism in VB.