Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / singleton

Singleton

singleton

Great Reads

by Boris Brock
This article presents a reusable base class for implementing singletons in C#.
by Jon Campbell
How to utilize WCF to allow a single instance of any WPF application without needing mutexes, extra assemblies, or special "hacks".
by honey the codewitch
Creating an application that can run once, but then accept command line args from subsequent runs
by Habibur Rony
This topic will cover the bad design practice using STUPID and good design practice using SOLID. Detailed explanation for Single Single Responsibility Principle, Open and Closed Principle, Liskov Substitution Principle, Interface Segregation Principle and Dependency Inversion (DI) Principle.

Latest Articles

by Boris Brock
This article presents a reusable base class for implementing singletons in C#.
by Jon Campbell
How to utilize WCF to allow a single instance of any WPF application without needing mutexes, extra assemblies, or special "hacks".
by honey the codewitch
Creating an application that can run once, but then accept command line args from subsequent runs
by Habibur Rony
This topic will cover the bad design practice using STUPID and good design practice using SOLID. Detailed explanation for Single Single Responsibility Principle, Open and Closed Principle, Liskov Substitution Principle, Interface Segregation Principle and Dependency Inversion (DI) Principle.

All Articles

Sort by Score

singleton 

by Dev Leader
About dependency injected singletons
by Dev Leader
How to structure your Singletons.
by StevenLJackson1
Describes the .NET ReaderWriterLock object and how to use it effectively to create a thread safe Singleton.
by Anton Angelov
Explains in detail how to implement Singleton Design Pattern. Practical examples how to use it in automation tests, following all SOLID principles.
by PratapReddyP
Singleton Pattern : This is a pattern which is widely used when there is a situation to create only one instance of a class.Lets demonstrate the pattern using a simple example. Earlier i used to wonder how load balancer servers work.
by Dev Leader
In this post, I’m going to focus on why singletons are “bad”, because for me it means acknowledging one of the two main perspectives–that they are the best thing since cat videos met The Internet or they are the worst thing since Justin Bieber.
by Paul M Watt
I am not aware of a software design pattern that has been vilified more than The Singleton. Just as every other design pattern, the singleton has its merits. Given the right situation, it provides a simple a clean solution, and just as every other design pattern, it can be misused.
by Trần_Tuấn_Anh
In Spring Framework, the singleton bean scope is the default and most commonly used scope. Despite its widespread use, many developers wonder how a singleton bean can handle multiple parallel requests in a multi-threaded environment without running into concurrency issues.