Re: How's dot.net doing nowadays?

Tech-Archive recommends: Speed Up your PC by fixing your registry




"Robert Morley" <rmorley@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:eeaf%23kUXIHA.5816@xxxxxxxxxxxxxxxxxxxxxxx

[VB-Interfaces]
What I find most useless about it in VB6 is the way it's done.
It is actually not that bad.
What you're probably overlooked is the concept of
"Object-Casting".

Implement a class, all the methods of that class become
"private <whatever> class_name" and I then have to "reimplement"
all of them if I want public methods or what have you.
I'm only guessing here, but of course you will have to
write code for all of these private stubs, for which VB already
gives you the correct method-signatures - The "Make Public-
part" of this secondary interface is already done under the
hood for all of these private functions at the time you type
the Implements-Statement.

Some Class cDefault, which implements Class cBase has
always a Default-Interface cDefault, the implemented
interface of cBase (in all of those private methods) is an
additional interface, which is only reachable by Object-Casting.

Dim oDefault as cDefault, oBase as cBase

'instantiation (and cast to the Default-Interface)
Set oDefault = New cDefault

'cast to the implemented interface on the same instance
Set oBase = oDefault

'but you can also cast directly whilst instantiation
Set oBase = New cDefault

HTH

Olaf


.