Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Singleton class within the C# forums, part of the Software Development category; What is Singleton class? Where it can be actually use?...
|
|||||||
|
|||
|
Re: Singleton class
Singleton class is a type of class which can have only one of it object through out the application. It does not allows its object to be created by the calling code e.g Class obj = new Class;
Instead it have a private constructor so that any other code can't create an object of class and it exposes a static method which internally creates an object of class if not already created or creates it and return to the calling code. Singleton class is mainly used for maintaining some information which would remain same throught out the application. Some of the example are Maintaining Connectionstring, Registry values in a object etc. If you want to know more you can go through dofactory.com Let me know if still have some question. ---V V--- Vikas Vaidya |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Object inside singleton class | akhi_chauhan | OOPS | 0 | 01-07-2009 11:19 PM |
| what is the use of Beaninfo class and introspector class in java beans? | anveth | Java | 0 | 11-24-2008 01:36 AM |
| Static and Singleton Class | Geek_Guest | C and C++ | 1 | 11-27-2007 06:26 AM |
| Singleton select | sdresh | MainFrame | 2 | 09-11-2007 03:20 AM |
| What will happen in case of singleton | Geek_Guest | Java | 1 | 07-31-2007 07:47 AM |