摘要:
在C#建立Event有5步:一: 最外面声明Delegate:delegate void MyEventHandler (int x, string y);二:建立含有私有类的Event(被别人使用):class MyClass(){ ... public event MyEventHandler MyEvent; ...}三:建立class的实例(Subscribing to an event)MyClass obj = new MyClass();四:Listening to the event:subscribe event: obj.MyEvent += handlerFun... 阅读全文