Formeln

Saturday, May 12, 2012

C# Singleton Pattern Snippet

Download

I prepared a snippet that you can use in your snippet manager to automatically make
a class a Singleton.

You can download the snippet here: Singleton.Snippet.
Copy it to your Visual Studio Snippets Folder (in my case .../Documents/Visual Studio 2010/Code Snippets/Visual C#/My Code Snippets/)


Just add a new Class, put your cursor below the class keyword,
type ston and hit tab twice.

.

No comments:

Post a Comment