EventHandler<TEventArgs>
?具体来说,我看到了一个例子
Class MyEvent{
...
public event EventHandler<MyEventArgs> SomeEvent;
...
}
Class EventDemo{
...
void MyEventHandler(Object sender, MyEventArgs e){
...
}
...
myEvent = new MyEvent();
myEvent.SomeEvent += new EventHandler<MyEventArgs>(MyEventHandler);
}
可以
myEvent.SomeEvent += new EventHandler<MyEventArgs>(MyEventHandler);
替换为
myEvent.SomeEvent += MyEventHandler;
特别是new EventHandler<MyEventArgs>()
尝试转换
函数MyEventHandler
从一种类型到另一种类型?
感谢。