class SingletonClass

{

ย ย protected static SingletonClass instance = null;

ย ย public static SingletonClass Instance => (instance ?? new SingletonClass());

ย ย 

ย ย protected SingletonClass(){ instance = this; }//must be called

}

https://gist.github.com/Yukinyaa/d4fad315acce0092bd4995a8e456e311

์š”์ฆ˜ ๋ฐ€๊ณ ์žˆ๋Š”๊ฑฐ์ž„

- dc official App