摘要:
publicstaticvoidBindCmdWithEventSrc(objecteventSrc,stringeventName,ICmdcmd){Actionact=delegate{if(cmd!=null){cmd.Execute();}};EventInfoei=eventSrc.GetType().GetEvent(eventName);varhandlerType=ei.EventHandlerType;vareventParams=handlerType.GetMethod("Invoke").GetParameters();//lambda:(objec 阅读全文
posted @ 2011-08-12 15:51 mrfangzheng 阅读(439) 评论(0) 推荐(0) 编辑