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();
}
Public sealed class Singleton
{
Private static readonly Singleton _instance = new Singleton();
}
No comments:
Post a Comment