Types of constructors

Tech-Archive recommends: Fix windows errors by optimizing your registry



What is a private constructor, and why would a class have one? What are
the other kinds of constructors besides:

(1) public constructors; and
(2) parameterized constructors

And I understand that they are not mutually exclusive of one another.
The above classification assimilates my knowledge of having used
constructors in both the above manners.

.



Relevant Pages

  • Re: Types of constructors
    ... A private constructor is a constructor that can only be used from within the ... You could have a class that has one or more private constructors and also ... one or more public constructors. ... Indeed -- Public, Private and Friend describe the scope of the constructor, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Types of constructors
    ... Private Constructors - The only time I have used them is when I am creating ... Public Constructors - are what get used when you create an instance of a ... > parameterized constructors ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Types of constructors
    ... > the other kinds of constructors besides: ... This is generally a sealed class with only a private constructor. ... only provides static methods. ...
    (microsoft.public.dotnet.general)
  • Re: A truly uninstantiable class?
    ... 'final' with the private constructor would be a better bet I ... signature in a subclass. ... So in that sense all constructors are final ... Prev by Date: ...
    (comp.lang.java.programmer)
  • Re: Types of constructors
    ... -You typically define a private constructor when you do not want a class to ... has static methods. ... static constructors which get called before the ... HTH ...
    (microsoft.public.dotnet.faqs)