A
Alex K.
Hi all
if three radio buttons can be handled by one handler, should I still create
three new handlers? E.g. can I use this:
this.radioA.CheckedChanged += LocationCheckedChanged;
this.radioB.CheckedChanged += LocationCheckedChanged;
this.radioC.CheckedChanged += LocationCheckedChanged;
...
void LocationCheckedChanged(object sender, EventArgs e)
{
...
}
instead of this:
this.radioA.CheckedChanged += new EventHandler(LocationCheckedChanged);
this.radioB.CheckedChanged += new EventHandler(LocationCheckedChanged);
this.radioC.CheckedChanged += new EventHandler(LocationCheckedChanged);
....
What are pros and cons?
Thank you
Alex
if three radio buttons can be handled by one handler, should I still create
three new handlers? E.g. can I use this:
this.radioA.CheckedChanged += LocationCheckedChanged;
this.radioB.CheckedChanged += LocationCheckedChanged;
this.radioC.CheckedChanged += LocationCheckedChanged;
...
void LocationCheckedChanged(object sender, EventArgs e)
{
...
}
instead of this:
this.radioA.CheckedChanged += new EventHandler(LocationCheckedChanged);
this.radioB.CheckedChanged += new EventHandler(LocationCheckedChanged);
this.radioC.CheckedChanged += new EventHandler(LocationCheckedChanged);
....
What are pros and cons?
Thank you
Alex