Yes, there is a difference.
In the first one, you are overriding the method that causes the event. Thus,
no other methods that are registered as handling this event have fired (many
objects can register to execute methods from the same event). So this method
executes before the event fires, and if you cann the base class's
implementation, that will cause the event to fire, and for the registered
methods to fire.
In the second one, you are simply one of the objects who have registered to
receive the event once it fires, and to execute a particular method.
"Daisy" <da***@nospam.oops> wrote in message
news:be**********@linux01.dannytuppeny.com...
Any reason why I should use one of these over the other?
Overriding:
protected override void OnMouseUp(MouseEventArgs e)
{
base.OnMouseUp(e);
// etc.
}
Events:
this.MouseDown += new MouseEventHandler(thisMouseDown);
public void thisMouseDown(object sender, MouseEventArgs e)
{
// etc.
}
--
Daisy The Cow
Now playing: Dannii Minogue - I Begin To Wonder