What is Private Constructor? and it’s use?![]()
Yes ,when a class declares only private instance constructors, it is not possible for classes outside the program to derive from the class or to directly create instances of it. (Except Nested classes)
Make a constructor private if:
– You want it to be available only to the class itself. For example, you might have a special constructor used only in the implementation of your class’ Clone method.
– You do not want instances of your component to be created. For example, you may have a class containing nothing but Shared utility functions, and no instance data. Creating instances of the class would waste memory.




Why do I get errors when I try to serialize a Hashtable?
What is Active Directory?
Can anybody tell What is Pinvoke?????????????/
the machine administrator, you can operate at the ‘machine’ level – which means not only that the changes you make become the default for the machine, but also that users cannot change the permissions to be more permissive. If you are a normal (non-admin) user you can still modify the permissions, but only to make them more restrictive.
You must be logged in to post a comment.