문제

How to implement singleton design pattern in C#?
Can anyone help me?

도움이 되었습니까?

해결책

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();
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top