public static LogWriter instance()
这是我的单件类中的方法,怎么为它设置个属性,别人调用的时候就不用打()了?为变量设置属性我会,为方法如何设置呢?
private static LogWriter _instance; public static LogWriter Instance { get { if (_instance == null) { _instance = instance(); } return _instance; } set { _instance = value; } }