什么时候应该执行以下操作?
class Foo : Control
{
protected override void OnClick(EventArgs e)
{
// new code here
}
}
与此相反?
class Foo : Control
{
public Foo()
{
this.Click += new EventHandler(Clicked);
}
private void Clicked(object sender, EventArgs e)
{
// code
}
}