How to define an Event Procedure manually

To define Event Procedures manually we need to follow a standard format as following:

[modifiers] void (object sender, EventArgs e) {
	(Stmts);
}


Event Procedures are non-value returning methods.

An event procedure can have any name but VS adopts a convention while naming them i.e.: _. E.g.: Form1_Load, button1_Click, textBox1_KeyPress

Every event procedure will take 2 mandatory parameters:

  • Object sender
  • ii. EventArgs e