public static FruitStore GetInstance() { //多线程下使用 //if (fsInstance==null) //{ //lock (_lock) //{ if (fsInstance == null) { fsInstance = new FruitStore(); } //} //} return(fsInstance); }
public void Execute() { FruitStore.GetInstance().ListOfFruits(); }