Click here to Skip to main content
15,900,818 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
how to write an singlton class in asp.net application ? can we make multiple object of singlton class ? 


What I have tried:

not trying ccccccccccccccccccccccccc
Posted
Updated 10-May-16 1:36am
v2
Comments
Ehsan Sajjad 10-May-16 6:36am    
if it is singleton, it will only have one single object
F-ES Sitecore 10-May-16 6:36am    
google "c# singleton pattern"

This smells like a homework question. There is nothing wrong with asking for help on your homework but you are not asking for help, you are asking other people to do your homework. Not a good idea.

I suggest you start by doing some reading, this will help Implementing Singleton in C#[^]
 
Share this answer
 
See Implementing Singleton in C#[^].
Please note the Singleton design pattern is easily extended to allow multiple instances (see, for instance, the Multiton pattern - Wikipedia, the free encyclopedia[^]).
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900