/// <summary> /// 類God安排qinshihuang(秦始皇)的僕人是lisi(李斯),並讓李斯的ArrangeFood /// 方法來處理qinshihuang的吃飯事件:qinshihuang.EatEvent += new EatEventHandler(lishi.ArrangeFood); /// </summary> public class God { public static void Main() { Master qinshihuang = new Master(); Servant lishi = new Servant();
qinshihuang.EatEvent += new EatEventHandler(lishi.ArrangeFood);