Hi,
I want to know that what the global constructor and in which scenario we used it ?
Global constructor
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Feb 7, 2012, 6:30 AM EST
It's possible for a class or struct to contain instance constructor(s) and/or a static constructor.
A static constructor initializes static data for the class or struct as a whole, is called at most once by the system and is guaranteed to run before any instance of that class or struct is created.
Deepak DwijRank #348 · 7.2K reputationPosted Feb 8, 2012, 1:45 AM EST
Sam HobbsRank #108 · 20.5K reputationPosted Feb 8, 2012, 12:54 PM EST