Click to See Complete Forum and Search --> : Implements ?


August 13th, 1999, 10:54 AM
Hi,
what's the purpose of the sentence 'implements'
when you are implementing classes inherit.

thanks.

Chris Eastwood
August 13th, 1999, 01:44 PM
Hi

The 'implements' keyword does not mean 'inheritance' in VB (well, it inherits Interfaces).

Implements is used to provide PolyMorphism in VB - this means that an Object (class/form/control) can be accessed using different interfaces.

Take a look at the VBCodeLibrary source-code at http://www.codeguru.com/vb/articles/1634.shtml for an example of the Implements keyword/methodology.

You'll see a base-class/interfaces called IDataObject which other classes 'implement' so that they can be called using that interface.



Chris Eastwood

CodeGuru - the website for developers
http://www.codeguru.com/vb