Hi,
Briefly describe about static constructor. And tell me why we create it.
Why we create static constructor in C#
4 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 attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Nov 5, 2012, 1:14 AM EST
Veerabhadram Dhodla14 reputationPosted Nov 5, 2012, 1:20 AM EST
Static Constructor of class will excecte before any of the static members of the class are referenced.
Vithal WadjeRank #19 · 47.2K reputationPosted Nov 5, 2012, 1:33 AM EST
we have their is no need to create the constructer using new keyword to assing the value it automatticalyy invokes so the static Class or methods are used
Shivendu Kesarvani100 reputationPosted Nov 5, 2012, 1:47 AM EST