I would like someone to try and explain the difference between these. More specifically, example usage scenario\'s.
I am refactoring some Windows Form
When overriding OnLoad, the call to base.OnLoad invokes the Load-event of the Form.
protected override void OnLoad(EventArgs e)
{
// do stuff before Load-event is raised
base.OnLoad(e);
// do stuff after Load-event was raised
}
If you don't specifically need to perform stuff before the Load-event is raised, placing the code in OnLoad after base.OnLoad(e) gives the same runtime behaviour as placing it in the Form_Load event handler.
I would recommend overriding the method rather than subscribing to the event.