11
Shouts

Atanas Hristov: Design Patterns – Singleton Pattern - blog about programming.

published 894 days, 17 hours, 8 minutes ago posted by http://atanashristov.blogspot.com/http://atanashristov.blogspot.com/ 896 days, 18 hours, 42 minutes ago
Friday, December 04, 2009 9:39:23 AM GMT Wednesday, December 02, 2009 8:05:13 AM GMT

The Singleton pattern gives us a way to restrict the instantiation of objects of given class to certain number, in the common usage to one only.

The Singleton class instantiates itself and works as a global repository for an instance of itself. For example we share a database connection or log writer across all threads in one process.

Implementation of Singleton pattern

Here i'm going to implement Singleton class in C#. The class should hide its constructor. It has also GetInstance() method that...

category: Foundation | clicked: 0 | | source: atanashristov.blogspot.com | show counter code
tags: Design Patterns

1 comment posted.

To post your comment please login or signup