eventhandler
- 网络委托;事件句柄
eventhandler
-
EventHandler is a delegate for a function that takes an Object ( the sender ) and EventArgs
这里EventHandler是某个函数的委托,该函数带有参数:Object(也就是sender)和EventArgs
-
It would be even more object oriented if you replaced the last bits of the if statement with a Map connecting EventTypes to EventHandler factory objects .
要想进一步增强面向对象特性,可以将if语句的最后一小部分替换为Map,后者将EventType连接到EventHandler工厂对象。