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 honey the codewitch
Creating an application that can run once, but then accept command line args from subsequent runs
by omid rezaei hanjani
Customized implementation of the Singleton pattern using Generics.
by Paulo Zemek
All classes are naturally Lazy loaded.So a better implementation will be:public class Singletonwhere T: new(){ public static readonly T Instance = new T();}You will notice that before calling the singleton class, the object will not be loaded.Surely there are...
by honey the codewitch
This tip demonstrates how to create an app that only allows one instance to run at a time
by rj45
simple Asp.net singleton
by comiscience
This is a singleton template class which can be used by classes with a private constructor.