Wednesday, 12 April 2017

How to implement singleton design pattern in C#?

In singleton pattern, a class can only have one instance and provides access point to it globally.

Public sealed class Singleton
{

Private static readonly Singleton _instance = new Singleton();


}

No comments:

Post a Comment