Questions tagged [singleton]

The singleton is a design pattern aiming to ensure that only a single instance of a class can be created and used.

The singleton is a design pattern aiming to ensure that only a single instance of a class can be created and used.

142 questions
4
votes
2 answers

Application Settings, Status and more as Singleton?

I am relatively new to programming (1yr field experience now) and I think that I am overusing the singleton pattern and I need some input on how to do it in a better way. Right now I am using singletons as an excuse for static global data. I use…
1
vote
2 answers

C# best/cleanest way to do singletons?

I'm working on a small project and I've decided to move over from DI to singleton pattern. Although I know 2 ways to do singleton. The first one is where every non-model class is a singleton. This…
Navine
  • 31