随手一记-单例模式写法
public class GameDataPreLoad { static private GameDataPreLoad _instance; static public GameDataPreLoad Instance { get { if (_instance == null) { _instance = new GameDataPreLoad(); } return _instance; } } }
public class GameDataPreLoad { static private GameDataPreLoad _instance; static public GameDataPreLoad Instance { get { if (_instance == null) { _instance = new GameDataPreLoad(); } return _instance; } } }