tags:

views:

163

answers:

3

please tell me the use of parameter e as System.EventArgs in CheckChanged event of CheckBox

+3  A: 

System.EventArgs has no use.

From the documentation:

This class contains no event data; it is used by events that do not
pass state information to an event handler when an event is raised.
If the event handler requires state information, the application 
must derive a class from this class to hold the data.
Sofahamster
Thanks mr. Sofahamster
Tejas
+2  A: 

You can ignore this one.

All events have the same signature: void handler(object sender, XxxEventArgs e)

Some events have more information and use a class derived from System.EventArgs for the second parameter.

For instance:

private void MainForm_KeyPress(object sender, KeyPressEventArgs e)
{
    char ch = e.KeyChar;
    ....
}
Henk Holterman
thanks mr. Henk
Tejas
A: 

As other have stated it's just there in order to have a signature that match all UI events.

which is (object sender, EventArgs (Or any derivative) args)

NPayette