What is difference between Private and static Constructor??
Why we need constructors in our program??What is difference between private and static constructors??
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
Farhan AhmedRank #73 · 25K reputationPosted Oct 7, 2020, 7:17 AM EDT
Vikas JhaRank #1,222 · 1.5K reputationPosted Oct 7, 2020, 3:58 AM EDT
https://www.c-sharpcorner.com/UploadFile/0c1bb2/constructors-and-its-types-in-C-Sharp/
https://www.tutlane.com/tutorial/csharp/csharp-private-constructor-with-examples
Hiten PandyaRank #1,237 · 1.4K reputationPosted Oct 7, 2020, 4:12 AM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Oct 7, 2020, 7:09 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Oct 7, 2020, 7:57 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Oct 7, 2020, 4:47 AM EDT
Rajeev KumarRank #1,334 · 1.3K reputationPosted Mar 6, 2023, 8:40 AM EST
Hi Priyanka
Static constructor is called before the first instance of class is created, wheras private constructor is called after the first instance of class is created. 2. Static constructor will be executed only once, whereas private constructor is executed everytime, whenever it is called.