Tag Archives: Software Sagacity

C# Design Patterns: #1 – The Singleton

SingletonThe Singleton is one of the simpler design patterns. As the name suggests, the Singleton creates a single, static, globally accessible class. It is an alternative to global variables and static classes, each which come with their own limitations.

Singletons are excellent areas to store global information, such as database connection strings, system paths, and parsed XML configurations. In addition, Singletons can be used to store global image caches so that images can be shared between functions.
Continue reading

RSS Twitter LinkedIn Facebook Email