System.Delegate.Combineを使えばいいのね。
以下コード。
class TestEvent
{
protected event System.EventHandler testEvent;
public event System.EventHandler OnTest
{
add
{
this.testEvent = (System.EventHandler)System.Delegate.Combine(this.testEvent, value);
}
remove
{
this.testEvent = (System.EventHandler)System.Delegate.Remove(this.testEvent, value);
}
}
}
TestEvent te = new TestEvent();
te.OnTest += delegate(object sender, System.EventArgs e)
{
....
};