where are these used
Where are static constructors used?
Hi,
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 attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted May 11, 2013, 9:10 AM EDT
However, here's an example of use:
Ashish ShuklaRank #458 · 5.5K reputationPosted May 10, 2013, 8:39 AM EDT
Common example is to initialize the application data that is used across the different pages.
Suma M161 reputationPosted May 11, 2013, 6:08 AM EDT
Ashish ShuklaRank #458 · 5.5K reputationPosted May 11, 2013, 9:48 AM EDT
we can initialize in a static constructor.
The above is only an example just to demonstrate one use of static constructors.A good example of a static constructor is a singleton class.
Suma M161 reputationPosted May 11, 2013, 5:38 PM EDT