February 28, 2012 at 8:20 pm

Singleton Pattern In C#

Design Patterns provide solutions to common recurring problems. The singleton design pattern is one of the most controversial pattern. Some people even call it anti-pattern, evil, or stupid. In software engineering, the singleton pattern is a design pattern used to ensure that an object has only one instance and provide a centralize point of access to itself. as we’ve been discussing using Singleton’s in Win Services for the previous post I talked about. This article describes about design pattern namely Singleton Pattern. Singleton Pattern, the most widely known and applied pattern in software development circles.

Singleton Pattern In C#

  • Best known Creational Design Pattern is Singleton.
  • We can implement this pattern in different ways.
  • Problem: Store some common data in a singleton or static class about your program in an object array, which you store in a class.
  • Singleton Design Pattern This pattern ensures that only a single instance of a given object can exist.
  • The Singleton pattern is used when you need one, and only one instance of your class.
  • The many colors used in this pair give the mittens the rich look of tapestry, yet only the background colors change during knitting.

More information about Singleton Pattern In C# on the site: http://www.codeproject.com

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Back to top