Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Quick singleton util class (See related posts)

// Quick singleton util class

	public sealed class Util
	{		
		Util(){}
				
		public static Util I
		{ get { return Nested.I; } }
    
		class Nested
		{
			static Nested() {}
			internal static readonly Util I = new Util();
		}
	}

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts