|
Class constructor |
Top Previous Next |
|
What is translated > Types > Records, Classes, Interfaces > Class > Constructors > Class constructor In Delphi, besides instance constructors, there is a class constructor that runs once per type before the first use of that type, after all involved unit initialization sections. “Use” includes creating an instance, accessing a class member, or querying RTTI. A base type’s class constructor runs before the derived type’s class constructor.
A Delphi class constructor is declared as:
class constructor Create;
C# equivalent: the static constructor
C# has a built-in concept of static construction:
static MyType() { // one-time initialization per closed type }
|
|
This page belongs to the Delphi2C# Documentation |
Delphi2C# home Content |