보다 심플한 C# 싱글턴 만들기 // simple type of c# singleton pattern public class Communicator { private static Communicator _inst; public static Communicator GetInst { get { return _inst; } } static Communicator() { _inst = new Communicator(); } private Communicator() { Console.WriteLine("NEW"); } } static 생성자를 통한 싱글턴 만들기. 더보기 이전 1 2 3 4 5 6 7 8 ··· 363 다음