Singleton


Snippet Details

Shortcut
singleton
Description
Creates a Singleton Class following the discussion on that post of mine: http://blogs.ugidotnet.org/piyo/archive/2005/09/14/Singleton_C_NET.aspx
Language
csharp
Types
Expansion
Author
Simone Chiaretta
Upload on
25-10-2013 17:22:10
Downloads
2790

Declarations

ID ToolTip Default
className Here the name of your singleton class Singleton

Code Output

        public sealed class $className$
{
	private readonly static $className$ _instance = new $className$();

	public static $className$ Current
    {
        get
        {
            return _instance;
        }
    }

	private $className$()
	{
       	//Implent here the initialization of your singleton
	}
}
    

Download Add to .VSIX Package


comments powered by Disqus

Extension Package

No snippets are added


Languages