Re: How's dot.net doing nowadays?
- From: "Schmidt" <sss@xxxxxxxxx>
- Date: Wed, 23 Jan 2008 04:48:47 +0100
"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 becomeI'm only guessing here, but of course you will have to
"private <whatever> class_name" and I then have to "reimplement"
all of them if I want public methods or what have you.
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
.
- Follow-Ups:
- Re: How's dot.net doing nowadays?
- From: Steve Gerrard
- Re: How's dot.net doing nowadays?
- References:
- How's dot.net doing nowadays?
- From: MM
- Re: How's dot.net doing nowadays?
- From: David
- Re: How's dot.net doing nowadays?
- From: Chris Anderson [MVP-VB]
- Re: How's dot.net doing nowadays?
- From: Karl E. Peterson
- Re: How's dot.net doing nowadays?
- From: Chris Anderson [MVP-VB]
- Re: How's dot.net doing nowadays?
- From: Karl E. Peterson
- Re: How's dot.net doing nowadays?
- From: Chris Anderson [MVP-VB]
- Re: How's dot.net doing nowadays?
- From: MM
- Re: How's dot.net doing nowadays?
- From: Steve Gerrard
- Re: How's dot.net doing nowadays?
- From: Robert Morley
- Re: How's dot.net doing nowadays?
- From: Steve Gerrard
- Re: How's dot.net doing nowadays?
- From: Robert Morley
- Re: How's dot.net doing nowadays?
- From: Robert Conley
- Re: How's dot.net doing nowadays?
- From: Robert Morley
- How's dot.net doing nowadays?
- Prev by Date: Re: How's dot.net doing nowadays?
- Next by Date: Re: How's dot.net doing nowadays?
- Previous by thread: Re: How's dot.net doing nowadays?
- Next by thread: Re: How's dot.net doing nowadays?
- Index(es):