Board index » cppbuilder » Re: Borland has broken it's promises once again
Rudy Velthuis [TeamB]
Re: Borland has broken it's promises once again
2005-11-26 03:17:30 AM
At 14:37:55, 25.11.2005, Alisdair Meredith [TeamB] wrote:
with 0 first, many Delphi classes do not initialize values before they
This is why Delphi allows you to control timing of
chain down to the base class constructor, but simply check these values
for 0 or nil in the virtual functions.
In Delphi for .NET, you can't have any code before the call to the base
constructor (the call is still explicit, but it must be the first thing
in the code of a constructor, otherwise the compiler barks at you),
because in .NET, like in C++, the base object must be initialized first.
So while it may look as if the derived constructor runs first, this is
not the case. I also think that there are issues with calling virtual
functions from a constructor, in .NET.
Rudy Velthuis [TeamB] velthuis.homepage.t-online.de
"It isn't pollution that's harming the environment. It's the impurities
in our air and water that are doing it." -- Dan Quayle.