Click here to Skip to main content
11,718,289 members (86,225 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Question on Private Constructor

, 25 Jan 2013 CPOL 0
A private constructor can occasionally be used in .Net.An example could be to generate a singleton class - a class which has only instance.For e.g.class A{ static A o; private A() { } public static A getinstance() { if (o == null) { return o =...



Compare Revision Minor Date Status Editor
4 - publicly available No 26-Jan-13 3:24 Available Abhinav S
Updates in content. 4 changes had been made.
3 No 26-Jan-13 1:27 Available Menon Santosh
rectified Syntax
2 No 26-Jan-13 0:37 Available PIEBALDconsult
Indentation, added assignment
1 No 26-Jan-13 0:05 Available Abhinav S


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Abhinav S
Software Developer (Senior)
India India
I don't know who I am.
Do you know who I am?

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150901.1 | Last Updated 26 Jan 2013
Article Copyright 2013 by Abhinav S
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid