Hi,
How many types of Constructor in C#?
Thanks.
Types of constructor in C#
1 Answer
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 2, 2011, 4:07 PM EDT
Instance constructors can have any type of accessibility : public, private, internal, protected or protected internal and may optionally take parameters. They can also be overloaded like other methods.
Static constructors cannot have an access modifier and never take parameters. They are called by the system when (and just before) a static member or instance constructor of the class is first accessed.