Hi,
How many types of Constructor in C#?
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Nov 2, 2011, 8:07 PM
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.