动态控件中的事件
下面是C#的代码,看不太懂
private Button _button;
public event EventHandler Click
{
add
{
this._button.Click += value;
}
remove
{
this._button.Click -= value;
}
}
Private _button As Button
Public Custom Event Click As EventHandler Implements IButton.Click
AddHandler(ByVal value As EventHandler)
'Me._button.Click += value
End AddHandler
RemoveHandler(ByVal value As EventHandler)
'Me._button.Click -= value
End RemoveHandler
RaiseEvent(ByVal sender As Object, ByVal e As EventArgs)
End RaiseEvent
End Event